|
|
@ -25,11 +25,11 @@ import 'package:neon/src/utils/stream_listenable.dart'; |
|
|
|
part 'router.g.dart'; |
|
|
|
part 'router.g.dart'; |
|
|
|
|
|
|
|
|
|
|
|
@internal |
|
|
|
@internal |
|
|
|
class AppRouter extends GoRouter { |
|
|
|
GoRouter buildAppRouter({ |
|
|
|
AppRouter({ |
|
|
|
|
|
|
|
required final GlobalKey<NavigatorState> navigatorKey, |
|
|
|
required final GlobalKey<NavigatorState> navigatorKey, |
|
|
|
required final AccountsBloc accountsBloc, |
|
|
|
required final AccountsBloc accountsBloc, |
|
|
|
}) : super( |
|
|
|
}) => |
|
|
|
|
|
|
|
GoRouter( |
|
|
|
debugLogDiagnostics: kDebugMode, |
|
|
|
debugLogDiagnostics: kDebugMode, |
|
|
|
refreshListenable: StreamListenable(accountsBloc.activeAccount), |
|
|
|
refreshListenable: StreamListenable(accountsBloc.activeAccount), |
|
|
|
navigatorKey: navigatorKey, |
|
|
|
navigatorKey: navigatorKey, |
|
|
@ -62,12 +62,11 @@ class AppRouter extends GoRouter { |
|
|
|
routes: $appRoutes, |
|
|
|
routes: $appRoutes, |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
static Page<void> _buildErrorPage(final BuildContext context, final GoRouterState state) => MaterialPage( |
|
|
|
Page<void> _buildErrorPage(final BuildContext context, final GoRouterState state) => MaterialPage( |
|
|
|
child: RouteNotFoundPage( |
|
|
|
child: RouteNotFoundPage( |
|
|
|
uri: state.uri, |
|
|
|
uri: state.uri, |
|
|
|
), |
|
|
|
), |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@immutable |
|
|
|
@immutable |
|
|
|
class AccountSettingsRoute extends GoRouteData { |
|
|
|
class AccountSettingsRoute extends GoRouteData { |
|
|
|