[bug]: CupertinoRoute do not respect PopScope when allowing swipe-to-dismiss
Closed this issue · 0 comments
TrentStarky commented
Describe the bug
When using a route created by using CupertinoRoute()
in the @StackedApp
annotation, the iOS swipe-to-pop gesture ignores PopScope(canPop: false)
. This means users can swipe back to pop a route that is not typically able to be popped.
What operating system do you use?
macOS
Information about the installed tooling
No response
Steps to reproduce the issue
- Add a
CupertinoRoute(page: MyPopScopePage)
to theroutes
list in the@StackedApp
annotation. - Create a new page named
MyPopScopePage
and add aPopScope(canPop: false)
widget to the page. - Navigate to the
MyPopScopePage
from another page using theRouterService
navigateToMyPopScopePage()
function. - The page will not be able to be popped via Android back buttons or Scaffold back buttons, but will be able to be popped via swiping from the left side of the screen.
Expected behavior
Setting PopScope(canPop: false)
should block any attempt to swipe the side of the page, similar to the behavior when using the now deprecated WillPopScope()
and returning false in the onWillPop
callback.
Screenshots
No response
Additional Context
No response