warning static method
void
warning(
- BuildContext context, {
- required String message,
- int duration = 2,
- ToastPosition position = ToastPosition.bottom,
- ToastAlignment alignment = ToastAlignment.center,
- ToastStyle style = ToastStyle.simple,
- TextStyle? textStyle,
- TextAlign textAlign = TextAlign.left,
- bool onClose = false,
- Curve animationCurve = Curves.easeInOut,
Displays a warning toast message.
(Same parameters as success)
Implementation
static void warning(
BuildContext context, {
required String message,
int duration = 2,
ToastPosition position = ToastPosition.bottom,
ToastAlignment alignment = ToastAlignment.center,
ToastStyle style = ToastStyle.simple,
TextStyle? textStyle,
TextAlign textAlign = TextAlign.left,
bool onClose = false,
Curve animationCurve = Curves.easeInOut,
}) {
_showToast(
context,
animationCurve: animationCurve,
message: message,
type: ToastType.warning,
duration: duration,
position: position,
alignment: alignment,
style: style,
textStyle: textStyle,
textAlign: textAlign,
onClose: onClose,
);
}