ComToast class

Constructors

ComToast.new()

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 Properties

isLoadingShowing bool
获取Loading状态
no setter

Static Methods

autoLoading<T>(Future<T> future(), {String? message}) Future<T>
Loading包装器方法,自动显示和隐藏loading future 要执行的异步操作 message loading显示的文字
clearMessageFilter() → void
清除消息过滤缓存(用于测试或特殊情况)
custom({required Widget builder(BuildContext), ComToastConfig? config, bool skipDuplicateFilter = false}) → void
显示自定义 Toast
customLoading({required Widget builder(BuildContext), bool barrierDismissible = false, ComToastConfig? config}) → void
显示自定义Loading
dismiss() → void
关闭当前显示的 Toast
error(String message, {ComToastConfig? config, bool skipDuplicateFilter = false}) → void
显示错误 Toast
hideLoading() → void
隐藏Loading
info(String message, {ComToastConfig? config, bool skipDuplicateFilter = false}) → void
显示信息 Toast
init({ComToastConfig? config}) → void
初始化全局配置
loading({String? message, bool barrierDismissible = false}) → void
显示Loading
setDuplicateFilterDuration(int milliseconds) → void
设置重复消息过滤时间(毫秒)
show(String message, {ComToastConfig? config, bool skipDuplicateFilter = false}) → void
显示普通 Toast
success(String message, {ComToastConfig? config, bool skipDuplicateFilter = false}) → void
显示成功 Toast
warning(String message, {ComToastConfig? config, bool skipDuplicateFilter = false}) → void
显示警告 Toast