-
-
Notifications
You must be signed in to change notification settings - Fork 383
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
AutoRouterDelegate.declarative is deprecated - use guards instead - no docs? #1928
Comments
@realitymolder share your existing implementation using declarative. |
I used it in root, as a routerDelegate:
|
@Milad-Akarie Just want to tag along and say that I'm using |
@realitymolder @mxknt you had no problems with deep-linking when working with the root declarative router? |
This is a new project, so didn't have a chance yet to get into deep linking. Also, my implementation of the router delegate (root) was very young, and I tried to go with the "best practice" to make sure I solve this issue in the best way possible. |
@realitymolder what you can do is have a sub-router dedicated to auth-flow and guard your home route with an auth guard |
I'm trying to implement that now, but it seems like I'm not able to update the state of the guard, like the guard is not listening, although I'm using
|
Hey there,
I've tried to use
AutoRouterDelegate.declarative
on AutoRoute 8, but it seems like it got deprecated.The deprecation message says that I should use guards instead. My goal here is to create an auth routing by
AuthState
, but I don't want the app to show me the routing animations between pages when the app will route the user after an auth check.How should I convert it into guards? I see no docs on the deprecation message or changelog.
P.S due to the fact that I use
AutoTabsScaffold
I cannot return theHomePage
because it has children (is a router of its own).Code example of the init Widget of the app that should change into guards, apparently.
Thank you,
D.
The text was updated successfully, but these errors were encountered: