cupertino_back_gesture icon indicating copy to clipboard operation
cupertino_back_gesture copied to clipboard

This library cannot use with WillPopScope

Open vannam22081988 opened this issue 4 years ago • 2 comments

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.

vannam22081988 avatar Aug 22 '20 15:08 vannam22081988

@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

emvaized avatar Jan 05 '21 22:01 emvaized

bool get popGestureEnabled { final PageRoute<T> 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; }

Hwy152 avatar Jul 15 '21 01:07 Hwy152