|
|
|
@ -25,11 +25,11 @@ import 'package:neon/src/utils/stream_listenable.dart';
|
|
|
|
|
part 'router.g.dart'; |
|
|
|
|
|
|
|
|
|
@internal |
|
|
|
|
class AppRouter extends GoRouter { |
|
|
|
|
AppRouter({ |
|
|
|
|
GoRouter buildAppRouter({ |
|
|
|
|
required final GlobalKey<NavigatorState> navigatorKey, |
|
|
|
|
required final AccountsBloc accountsBloc, |
|
|
|
|
}) : super( |
|
|
|
|
}) => |
|
|
|
|
GoRouter( |
|
|
|
|
debugLogDiagnostics: kDebugMode, |
|
|
|
|
refreshListenable: StreamListenable(accountsBloc.activeAccount), |
|
|
|
|
navigatorKey: navigatorKey, |
|
|
|
@ -62,12 +62,11 @@ class AppRouter extends GoRouter {
|
|
|
|
|
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( |
|
|
|
|
uri: state.uri, |
|
|
|
|
), |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@immutable |
|
|
|
|
class AccountSettingsRoute extends GoRouteData { |
|
|
|
|