showToast function
Future<ExtendedOverlayEntry?>
showToast(
- String message, {
- ToastIconStyle? iconStyle,
- FlAnimationStyle? animationStyle,
- Duration? animationDuration,
- TextStyle? textStyle,
- Duration? duration,
- GestureTapCallback? onToastTap,
- ToastBuilder? builder,
- ToastOptions? options,
Toast 关闭 closeToast(); 添加 await Toast 关闭后继续执行之后的方法
Implementation
Future<ExtendedOverlayEntry?> showToast(
String message, {
/// icon 样式 不传 仅显示文字
ToastIconStyle? iconStyle,
/// 动画样式
FlAnimationStyle? animationStyle,
/// 动画执行时间
Duration? animationDuration,
/// 显示文字样式
TextStyle? textStyle,
/// Toast显示时间
Duration? duration,
/// Toast onTap
GestureTapCallback? onToastTap,
/// 重新 build text icon
ToastBuilder? builder,
/// ToastOptions
ToastOptions? options,
}) =>
Toast(
message,
animationStyle: animationStyle,
animationDuration: animationDuration,
textStyle: textStyle,
iconStyle: iconStyle,
builder: builder,
onToastTap: onToastTap,
duration: duration,
options: options,
).show();