error static method
void
error(})
Helper for an ERROR toast.
Implementation
static void error(
BuildContext context, {
required String message,
Duration duration = const Duration(seconds: 4),
bool top = false,
int maxLines = 4,
double? iconSize,
TextStyle? textStyle,
Color? backgroundColor,
Color? textColor,
Color? shadowColor,
}) {
show(
context,
message: message,
icon: Icons.error_outline,
backgroundColor: backgroundColor ?? Colors.red.shade700,
textColor: textColor ?? Colors.white,
duration: duration,
top: top,
maxLines: maxLines,
iconSize: iconSize,
textStyle: textStyle,
shadowColor: shadowColor ?? Colors.red.shade900,
elevation: 6.0,
);
}