showToast function

Future<ExtendedOverlayEntry?> showToast(
  1. String message, {
  2. ToastIconStyle? iconStyle,
  3. FlAnimationStyle? animationStyle,
  4. Duration? animationDuration,
  5. TextStyle? textStyle,
  6. Duration? duration,
  7. GestureTapCallback? onToastTap,
  8. ToastBuilder? builder,
  9. 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();