1

I have a shell route called BasePage with routes such as HomePage. I want the first screen of my app to be another page called FirstPage. Then, I want to navigate from FirstPage to BasePage. However, BasePage doesn't have a path, so when I use context.push(<path_of_home_page>);, HomePage doesn't have a scaffold and it's missing the bottom app bar. How can I navigate to the shell route?

EDIT Adding the shell route:

ShellRoute(
      navigatorKey: _shellNavigatorKey,
      pageBuilder: (_, __, child) => NoTransitionPage(child: BasePage(child: child)),
      routes: [
        GoRoute(
          path: Paths.home,
          pageBuilder: (context, state) => const NoTransitionPage(
            child: HomePage(),
          ),
        ),
        // ...
      ],
    ),
Miro
  • 364
  • 1
  • 12

0 Answers0