showError static method

void showError(
  1. String message, {
  2. SnackBarAction? action,
  3. EdgeInsetsGeometry? margin,
  4. SnackBarBehavior? behavior,
  5. ShapeBorder? shape,
  6. DismissDirection dismissDirection = DismissDirection.down,
  7. Color? backgroundColor,
  8. TextStyle? textStyle,
  9. Duration duration = const Duration(seconds: 5),
})

Implementation

static void showError(
  String message, {
  SnackBarAction? action,
  EdgeInsetsGeometry? margin,
  SnackBarBehavior? behavior,
  ShapeBorder? shape,
  DismissDirection dismissDirection = DismissDirection.down,
  Color? backgroundColor,
  TextStyle? textStyle,
  Duration duration = const Duration(seconds: 5),
}) {
  _showSnackBar(
    message,
    action: action,
    duration: duration,
    margin: margin,
    behavior: behavior,
    shape: shape,
    dismissDirection: dismissDirection,
    backgroundColor: backgroundColor ?? Colors.red,
    textStyle: textStyle ??
        _snackBarTheme?.contentTextStyle?.copyWith(color: Colors.white),
  );
}