Skip to content

Commit

Permalink
Handle new pageRoute.popDisposition
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasWanke committed Jan 20, 2024
1 parent 8dd381c commit 9cee84a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/src/page_route.dart
Expand Up @@ -163,12 +163,9 @@ class SwipeablePageRoute<T> extends CupertinoPageRoute<T> {
if (route.willHandlePopInternally) return false;
// If attempts to dismiss this route might be vetoed such as in a page
// with forms, then do not allow the user to dismiss the route with a swipe.
//
// TODO(JonasWanke): Use `route.hasScopedWillPopCallback ||
// route.popDisposition == RoutePopDisposition.doNotPop` after upgrading
// Flutter.
// ignore: deprecated_member_use
if (route.hasScopedWillPopCallback) return false;
if (route.hasScopedWillPopCallback ||
route.popDisposition == RoutePopDisposition.doNotPop) return false;
// Fullscreen dialogs aren't dismissible by back swipe.
if (route.fullscreenDialog) return false;
// If we're in an animation already, we cannot be manually swiped.
Expand Down

0 comments on commit 9cee84a

Please sign in to comment.