showMsg static method
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),
通用文本显示
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,
);
}