ExtendedPopScope<T> constructor
ExtendedPopScope<T> ({
- Key? key,
- required Widget child,
- bool canPop = false,
- PopInvokedWithResultAndOverlayCallback? onPopInvokedWithResult,
- PopInvokedWithOverlayCallback? onPopInvoked,
- bool isCloseOverlay = true,
Implementation
ExtendedPopScope({
super.key,
required super.child,
super.canPop = false,
/// 支持 3.24
PopInvokedWithResultAndOverlayCallback? onPopInvokedWithResult,
/// 3.24之前的版本保留
PopInvokedWithOverlayCallback? onPopInvoked,
/// true 点击android实体返回按键先关闭Overlay【loading ...】但不pop 当前页面
bool isCloseOverlay = true,
}) : super(onPopInvokedWithResult: (bool didPop, T? result) {
bool isClose = false;
if (isCloseOverlay && ExtendedOverlay().overlayEntryList.isNotEmpty) {
isClose = true;
closeOverlay();
}
onPopInvoked?.call(didPop, isClose);
onPopInvokedWithResult?.call(didPop, result, isClose);
});