XLoading class

便捷的创建 loading,支持设置全局样式,也支持设置单次样式。能够自动消失。

Constructors

XLoading()

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

isShow bool
是否正在显示 loading
no setter

Static Methods

fix() → dynamic
出现任何异常时可调用尝试修复
hide({BuildContext? context}) → dynamic
隐藏 loading。 context 有时,开发者可能需要自行传入当前 context
init(Widget widget, {Color? backgroundColor}) → dynamic
初始化默认的 loading 视图
show(BuildContext context, {Widget? loading, int? duration, Color? color, bool closable = false}) → dynamic
显示 Loading loading - 自定义的 Loading 视图 duration - 指定毫秒后,自动隐藏。如果为 null,则不自动隐藏 color - loading 时的背景颜色,默认为 Colors.black54 closable - 是否可以通过返回按钮关闭 loading