auto_route_library
auto_route_library copied to clipboard
Initial page created when homeIndex is set differently
Initial setup:
- I have a list of 3 children in the
router
Expected behavior:
- when I load main screen for the first time and specify
home index
inAutoTabsRouter
as 1- only page 1 is loadede
Current/wrong behavior:
- when I load main screen for the first time and specify
home index
inAutoTabsRouter
as 1- page 0 is loaded first
- immediately after it page 1 is loaded
Below you can find my code:
router
:
AutoRoute(
page: MainScreenRoute.page,
initial: true,
children: [
AutoRoute(page: MyTasksPageRoute.page),
AutoRoute(page: MainPageSearchTaskRoute.page),
AutoRoute(page: MyProfilePageRoute.page),
],
),
main class
:
return AutoTabsScaffold(
routes: const [
MyTasksPageRoute(),
MainPageSearchTaskRoute(),
MyProfilePageRoute(),
],
homeIndex: state.currentPage.index,
bottomNavigationBuilder: (_, TabsRouter router) {