You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AutoRouteGuards only work for "forward" navigation. It would be awesome if we could configure each AutoRouteGuard to also work for "backward" navigation (ex. when the route on top of the protected route is popped off or when a user presses the browser back button in Flutter web).
The main use case for this is to show a confirmation popup when a user tries to exit a screen. This is useful when editing forms or other screens that can lose progress.
Agree. I was looking for this in the documentation today, thinking that it was implemented in AutoRouteGuard. In my case, the authorization should expire after moving back in the stack. In the current implementation of AutoRouteGuard, this is not possible.
This can probably be done with AutoRouterObserver, but it would be useful to have it in AutoRouteGuard since it doesn't require a global observer to be installed.
AutoRouteGuards only work for "forward" navigation. It would be awesome if we could configure each AutoRouteGuard to also work for "backward" navigation (ex. when the route on top of the protected route is popped off or when a user presses the browser back button in Flutter web).
The main use case for this is to show a confirmation popup when a user tries to exit a screen. This is useful when editing forms or other screens that can lose progress.
I created a repo that illustrates the issue:
Sample repo (check auto_route folder): https://github.com/CodeOTR/flutter_web_navigation
In go_router, you can accomplish this by adding an onExit function to any route.
auto_route_guard.mov
The text was updated successfully, but these errors were encountered: