showSimpleSnackBar method
Display simple snackbar
if textStyle
is given then fontColor
and fontSize
will be ignored
Default Duration = 3 Seconds
Implementation
ScaffoldFeatureController<SnackBar, SnackBarClosedReason> showSimpleSnackBar(
String message,
{double? fontSize,
Color? fontColor,
TextStyle? textStyle,
Color? backgroundColor,
Duration? duration}) {
return ScaffoldMessenger.of(this).showSnackBar(
SnackBar(
content: Text(
message,
style: textStyle ??= TextStyle(fontSize: fontSize, color: fontColor),
),
backgroundColor: backgroundColor,
duration: duration ??= 3.seconds,
),
);
}