Created
July 13, 2021 20:28
-
-
Save chunhtai/92ec065e42219a030201b29065fdcbf6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@MaterialAutoRouter( | |
replaceInRouteName: 'Screen,Route', | |
routes: <AutoRoute>[ | |
AutoRoute( | |
path: "/", | |
page: AppStackScreen, | |
redirect: () { | |
if (!signedIn) { | |
redirect('/signIn'); | |
} | |
} | |
children: [ | |
AutoRoute(path: "", page: HomeScreen), | |
AutoRoute(path: "books", page: BooksListScreen), | |
], | |
), | |
AutoRoute(path: "/signIn", page: SignInScreen), | |
RedirectRoute(path: "*", redirectTo: "/") | |
], | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment