JunnyLoadingUtils class

Loading事务管理器 用于管理应用中的所有loading展示逻辑,提供以下特性:

  1. 优先级队列管理
  2. 超时自动关闭
  3. 状态追踪
  4. 事件通知
  5. 线程安全

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