WToast class

WToast 工具类,用于显示自定义对话框

使用示例:

// 显示成功提示
WToast.showSuccess('提交成功');

// 显示错误提示
WToast.showError('网络错误');

// 显示警告提示
WToast.showWarning('请检查输入');

// 显示加载提示
final cancel = WToast.showLoading();
// 关闭加载提示
WToast.hideLoading();

Constructors

WToast()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

clearCache() → void
清空所有缓存
clearQueue() → void
清空所有提示队列
showCustomDialog({required Widget toastBuilder(CancelFunc cancelFunc), Alignment? align, void onClose()?, Duration? duration, Color? backgroundColor, Duration? animationDuration = const Duration(milliseconds: 200), void onError(dynamic error)?}) → CancelFunc
显示自定义对话框(直接使用 BotToast 原生方法)