show method
void
show(
- BuildContext context, {
- LoadingStyle style = LoadingStyle.overlay,
- LoadingType type = LoadingType.classic,
- String overlayKey = '',
- String? text,
显示loading
context
widget context
style
loading渲染方式
type
加载类型(设置该类型显示加载的不同样式)
overlayKey
当前style==LoadingStyle.aloneOverlay时,该为必填项用于区分不同loading视图的标识
text
显示文本
Implementation
void show(BuildContext context,
{LoadingStyle style = LoadingStyle.overlay,
LoadingType type = LoadingType.classic,
String overlayKey = '',
String? text}) {
if (style == LoadingStyle.overlay || style == LoadingStyle.aloneOverlay) {
_showOverlay(context, text ?? "", type, style == LoadingStyle.aloneOverlay, overlayKey);
} else if (style == LoadingStyle.global) {
_isGlobal = true;
_showGlobal(context, text ?? "", type);
}
}