showError static method
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),
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),
);
}