ExtendedPopScope constructor

ExtendedPopScope({
  1. Key? key,
  2. required Widget child,
  3. bool canPop = true,
  4. PopInvokedCallback? onPopInvoked,
  5. bool isCloseOverlay = false,
})

Implementation

ExtendedPopScope({
  super.key,
  required super.child,
  super.canPop = true,
  PopInvokedCallback? onPopInvoked,

  /// true 点击android实体返回按键先关闭Overlay【toast loading ...】但不pop 当前页面
  /// false 点击android实体返回按键先关闭Overlay【toast loading ...】并pop 当前页面
  bool isCloseOverlay = false,
}) : super(onPopInvoked: (bool didPop) async {
        if (isCloseOverlay && ExtendedOverlay().overlayEntryList.isNotEmpty) {
          closeOverlay();
        }
        onPopInvoked?.call(didPop);
      });