From becb2416c48cec07963b2b4b233e87c78dce8832 Mon Sep 17 00:00:00 2001 From: wowbox Date: Fri, 8 Mar 2024 04:58:23 +0800 Subject: [PATCH] fix: PopScope swipe back --- lib/get_navigation/src/routes/get_transition_mixin.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/get_navigation/src/routes/get_transition_mixin.dart b/lib/get_navigation/src/routes/get_transition_mixin.dart index 3af79f9ee..89cb9d72f 100644 --- a/lib/get_navigation/src/routes/get_transition_mixin.dart +++ b/lib/get_navigation/src/routes/get_transition_mixin.dart @@ -780,6 +780,8 @@ Cannot read the previousTitle for a route that has not yet been installed''', // 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. if (route.hasScopedWillPopCallback) return false; + // support [PopScope] + if (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.