toast method
dynamic
toast({
- bool clearAllTast = true,
- Color? bgColor,
- ToastPosition position = ToastPosition.bottom,
Implementation
toast({
bool clearAllTast = true,
Color ? bgColor,
ToastPosition position = ToastPosition.bottom,
}) {
if (clearAllTast) {
dismissAllToast();
}
if (this is Widget) {
showToastWidget(
this as Widget,
position: position,
);
return;
}
showToast(
this.toString(),
position: position,
backgroundColor: bgColor,
);
}