easySnackBar method

ScaffoldFeatureController<SnackBar, SnackBarClosedReason> easySnackBar(
  1. String message, {
  2. double? fontSize,
  3. Color? fontColor,
  4. TextStyle? textStyle,
  5. Color? backgroundColor,
  6. Duration? duration,
})

Display simple snackbar

if textStyle is given then fontColor and fontSize will be ignored

Default Duration = 3 Seconds

Implementation

ScaffoldFeatureController<SnackBar, SnackBarClosedReason> easySnackBar(
    String message,
    {double? fontSize,
    Color? fontColor,
    TextStyle? textStyle,
    Color? backgroundColor,
    Duration? duration}) {
  return context.showSimpleSnackBar(
    message,
    fontSize: fontSize,
    fontColor: fontColor,
    textStyle: textStyle,
    backgroundColor: backgroundColor,
    duration: duration,
  );
}