showMsg static method

ToastFuture showMsg(
  1. String? msg, {
  2. Duration? duration,
  3. ToastPosition? position,
  4. TextStyle? textStyle,
  5. EdgeInsetsGeometry? textPadding,
  6. Color? backgroundColor,
  7. double? radius,
  8. VoidCallback? onDismiss,
  9. TextDirection? textDirection,
  10. bool? dismissOtherToast,
  11. TextAlign? textAlign,
  12. OKToastAnimationBuilder? animationBuilder,
  13. Duration? animationDuration,
  14. Curve? animationCurve,
  15. BoxConstraints? constraints,
  16. EdgeInsetsGeometry? margin = const EdgeInsets.all(50),
})

通用文本显示

Implementation

static ToastFuture showMsg(
  String? msg, {
  Duration? duration,
  ToastPosition? position,
  TextStyle? textStyle,
  EdgeInsetsGeometry? textPadding,
  Color? backgroundColor,
  double? radius,
  VoidCallback? onDismiss,
  TextDirection? textDirection,
  bool? dismissOtherToast,
  TextAlign? textAlign,
  OKToastAnimationBuilder? animationBuilder,
  Duration? animationDuration,
  Curve? animationCurve,
  BoxConstraints? constraints,
  EdgeInsetsGeometry? margin = const EdgeInsets.all(50),
}) {
  return showToast(
    msg ?? "",
    duration: duration,
    position: position ?? ToastPosition.bottom,
    textStyle: textStyle,
    textPadding: textPadding ?? const EdgeInsets.fromLTRB(15, 8, 15, 8),
    backgroundColor: backgroundColor ?? Color(0xFF45494D),
    radius: radius,
    onDismiss: onDismiss,
    textDirection: textDirection,
    dismissOtherToast: dismissOtherToast,
    textAlign: textAlign,
    animationBuilder: animationBuilder,
    animationCurve: animationCurve,
    constraints: constraints,
    margin: margin,
  );
}