JunnyLoadingUtils class
Loading事务管理器 用于管理应用中的所有loading展示逻辑,提供以下特性:
- 优先级队列管理
- 超时自动关闭
- 状态追踪
- 事件通知
- 线程安全
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
onLoadingEvent
→ Stream<
LoadingEvent> -
loading事件流,供外部监听loading状态变化
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
dismiss(
[String? tagOrId]) → Future< void> -
隐藏指定的loading
tagOrId- loading的标签或ID 如果未指定,则关闭最近显示的loading -
dismissAll(
) → Future< void> - 清除所有loading 会同时清空队列中的所有事务
-
dispose(
) → void - 释放资源 清理所有队列和事件监听器
-
init(
{bool clickMaskDismiss = false, SmartBackType backType = SmartBackType.block, Duration? displayTime, Color maskColor = Colors.transparent, Widget builder(BuildContext context, {String? message})?, String? defaultMessage}) → void -
初始化loading管理器的默认配置
clickMaskDismiss- 点击遮罩是否关闭backType- 返回键行为displayTime- 默认显示时长maskColor- 遮罩颜色builder- 自定义loading构建器defaultMessage- 默认提示文本 -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
show(
{String? tag, JunnyLoadingDialogConfig? config}) → Future< String> -
显示loading
tag- loading标识,用于后续控制config- 自定义配置,覆盖默认配置 返回loading事务ID,用于精确控制特定loading -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → JunnyLoadingUtils
-
获取单例访问点
no setter