PiN73 / cupertino_back_gesture

Flutter package to set custom width of iOS back swipe gesture area
BSD 3-Clause "New" or "Revised" License
30 stars 17 forks source link

This library cannot use with WillPopScope #6

Open vannam22081988 opened 4 years ago

vannam22081988 commented 4 years ago

Hi Author. With TargetPlatform.android: CupertinoPageTransitionsBuilderCustomBackGestureWidth() In OtherPage, I use WillPopScope to catch back event of Android then this library is not working.

Thank you.

emvaized commented 3 years ago

@vannam22081988 This seems to be generic Flutter issue, not related to this library. See the updates on it here: https://github.com/flutter/flutter/issues/58907

Hwy152 commented 3 years ago

bool get popGestureEnabled { final PageRoute route = hostRoute ?? this; // If there's nothing to go back to, then obviously we don't support // the back gesture. if (route.isFirst) return false; // If the route wouldn't actually pop if we popped it, then the gesture // would be really confusing (or would skip internal routes), so disallow it. 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. if (route.hasScopedWillPopCallback) return false; // Fullscreen dialogs aren't dismissable by back swipe. if (fullscreenDialog) return false; // If we're in an animation already, we cannot be manually swiped. if (route.controller.status != AnimationStatus.completed) return false; // If we're in a gesture already, we cannot start another. if (popGestureInProgress) return false; // Looks like a back gesture would be welcome! return true; }