errorSnackBar method

Future errorSnackBar(
  1. String message, {
  2. double? elevation,
  3. EdgeInsetsGeometry? margin,
  4. EdgeInsetsGeometry? padding,
  5. double? width,
  6. ShapeBorder? shape,
  7. SnackBarBehavior behavior = SnackBarBehavior.floating,
  8. SnackBarAction? action,
  9. Duration duration = const Duration(seconds: 4),
  10. Animation<double>? animation,
  11. VoidCallback? onVisible,
  12. bool waitDialogToPop = true,
  13. bool waitPopupRouteToPop = false,
})

Implementation

Future errorSnackBar(
  String message, {
  double? elevation,
  EdgeInsetsGeometry? margin,
  EdgeInsetsGeometry? padding,
  double? width,
  ShapeBorder? shape,
  SnackBarBehavior behavior = SnackBarBehavior.floating,
  SnackBarAction? action,
  Duration duration = const Duration(seconds: 4),
  Animation<double>? animation,
  VoidCallback? onVisible,
  bool waitDialogToPop = true,
  bool waitPopupRouteToPop = false,
}) {
  return showSnackBar(
    message,
    backgroundColor: Theme.of(this).colorScheme.error,
    textColor: Theme.of(this).colorScheme.onError,
    elevation: elevation,
    margin: margin,
    padding: padding,
    width: width,
    shape: shape,
    behavior: behavior,
    action: action,
    duration: duration,
    animation: animation,
    onVisible: onVisible,
    waitPopupRouteToPop: waitPopupRouteToPop,
    waitDialogToPop: waitDialogToPop,
  );
}