show method
Implementation
OverlayTier? show(
BuildContext context,
Widget widget, {
Duration? duration,
bool opaque = false,
bool maintainState = false,
bool replace = true,
}) {
/// 不替换且显示中则不处理
if (!replace && _tier != null && _tier!.isShowing) {
return this;
}
_tier?.dismiss();
_tier = TimeOverlayEntry(
duration: duration,
maintainState: maintainState,
opaque: opaque, //不透明
builder: (_) {
return Material(type: MaterialType.transparency, child: widget);
},
);
_tier?.show(context);
return this;
}