I have home page which includes different pages inside it, app can navigate to every other page except VolunteerDasboardRoute
. I don’t know why, first it initializes HomeRoute then it should initialize VolunteerDashboardRoute but it gives that error
Failed to navigate to VolunteerDashboardRoute
AutoRoute file
Home AutoTabsScaffold Code
AutoTabsScaffold(
routes: viewModel.isVolunteer
? _routesForVolunteer
: _routesForImpaired,
backgroundColor: UIHelper.white,
// body: viewModel.isPageLoading
// ? const Center(child: CircularProgressIndicator())
// : viewModel.isVolunteer
// ? _screensForVolunteer[viewModel.pageIndex]
// : _screensForImpaired[viewModel.pageIndex],
bottomNavigationBuilder: (_, tabsRouter) {
return CircleNavBar(
activeIndex: tabsRouter.activeIndex,
activeIcons: viewModel.isVolunteer
? _activeIconsForVolunteer
: _activeIconsForImpaired,
inactiveIcons: viewModel.isVolunteer
? _inactiveIconsForVolunteer
: _inactiveIconsForImpaired,
height: 70,
circleWidth: 62,
onTap: tabsRouter.setActiveIndex,
color: UIHelper.blackOut,
cornerRadius: const BorderRadius.only(
topLeft: Radius.circular(16),
topRight: Radius.circular(16),
),
shadowColor: UIHelper.formalGrey,
elevation: 10,
);
},
)
List<PageRouteInfo<dynamic>> _routesForImpaired = [
const ImpairedDashboardRoute(),
const CameraRoute(),
const SettingsRoute(),
];
List<PageRouteInfo<dynamic>> _routesForVolunteer = [
const VolunteerDashboardRoute(),
const SettingsRoute(),
];