-
-
Notifications
You must be signed in to change notification settings - Fork 400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handling of back navigation in nested routes, ignored PopScope #1957
Comments
So, I come up with a theory. Looks like |
So I think I finally solved the issue for my case. I will try to describe the solution as best I can. Let's take for example one nested page from my example above, e.g. My solution was to wrap the whole content inside
This will handle the back button on that page, and always block the maybePop. It will also invoke the This solves half of my issue, with blocking of the navigation on a specific page. The second issue is to get notified every time the navigation changes, and I actually change the child navigation, which I am currently handling using NavigationObserver. This means that on the root
|
i think u need this method |
Hey, I am trying to understand how the Nested navigation is actually working, and why the PopScope is ignored. Also, I am looking for a way how to implement the following functionality:
IdentityVerificationRoute
is a wrapper screen, that hasAppBar
, some fancy wrapping, and containsAutoRouter
to display children.PopScope
is not handled at all, and works correctly only on the first step, where the back button would invoke exiting the flow completely.I am not sure if this is a bug or if I am just missing something. Is there another way how I should limit the back navigation? In the most ideal case, I would love to handle and limit the back directly on the specific step. Sadly, the PopScope is completely ignored there.
The text was updated successfully, but these errors were encountered: