router property

GoRouter router
latefinal

Implementation

late final GoRouter router = GoRouter(
  navigatorKey: _rootNavigatorKey,
  debugLogDiagnostics: kDebugMode,
  initialLocation: AppPaths.home,
  observers: <NavigatorObserver>[
    TalkerRouteObserver(GetIt.I.get<Talker>()),
  ],
  refreshListenable: GoRouterRefreshStream(
    GetIt.I.get<InternetConnectionBloc>().stream,
  ),
  redirect: _redirect,
  errorBuilder: (_, __) => const PageNotFoundScreen(),
  routes: <RouteBase>[
    _forceUpdateRoute,
    _authRoute,
    _clientsRoute,
    _noInternetConnectionRoute,
    _searchRoute,
    _statefulShellRoute,
    _talkerRoute,
    _webViewRoute,
  ],
);