Skip to content

AutoRoute v6: Have an initial route other than '/' #1460

Closed Answered by theemaster
theemaster asked this question in Q&A
Discussion options

You must be logged in to vote

So the solution was in v6 you have to use RedirectRoute:

  @override
  final List<AutoRoute> routes = [
    RedirectRoute(path: '/', redirectTo: '/login'), //Note that '/' needs to be used
    AutoRoute(page: LoginViewRoute.page, path: '/login'),
    AutoRoute(page: OnboardingViewRoute.page, path: '/onboarding'),
    AutoRoute(path: '/signup', page: SignUpViewRoute.page),
    AutoRoute(path: '/forgotpassword', page: ForgotPasswordViewRoute.page),
    AutoRoute(path: '/main',
        page: MainNavigationViewRoute.page,
        children: [
          AutoRoute(path: 'manage',
              page: ManageWrapperRoute.page,
              children: [
                RedirectRoute(path: '', redire…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by theemaster
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant