showToast static method
提供toast示例
alignment:控制toast出现的位置
Implementation
static Future<void> showToast(
String msg, {
Duration time = const Duration(milliseconds: 2000),
alignment: Alignment.bottomCenter,
Widget? widget,
}) async {
_toastAction.showToast(
time: time,
widget: ToastHelper(
child: widget ?? ToastWidget(msg: msg, alignment: alignment),
),
);
}