fix
This commit is contained in:
@@ -39,7 +39,7 @@ Future<void> initApp(EnvironmentEnum env) async {
|
|||||||
await GetIt.I<TreezorWalletConnectionService>().logout();
|
await GetIt.I<TreezorWalletConnectionService>().logout();
|
||||||
} catch (_) {}
|
} catch (_) {}
|
||||||
await clearSessionData();
|
await clearSessionData();
|
||||||
appRouter.go(AppRoutes.legacyLogin);
|
appRouter.go(AppRoutes.login);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,25 @@ import 'package:splash/splash.dart';
|
|||||||
|
|
||||||
final GlobalKey<NavigatorState> rootNavigatorKey = GlobalKey<NavigatorState>();
|
final GlobalKey<NavigatorState> rootNavigatorKey = GlobalKey<NavigatorState>();
|
||||||
|
|
||||||
|
final _legacyControlPanelNavKey =
|
||||||
|
GlobalKey<NavigatorState>(debugLabel: 'legacyControlPanel');
|
||||||
|
final _legacyDeviceMgmtNavKey =
|
||||||
|
GlobalKey<NavigatorState>(debugLabel: 'legacyDeviceMgmt');
|
||||||
|
final _legacyLocationNavKey =
|
||||||
|
GlobalKey<NavigatorState>(debugLabel: 'legacyLocation');
|
||||||
|
final _legacyChatNavKey = GlobalKey<NavigatorState>(debugLabel: 'legacyChat');
|
||||||
|
final _legacySettingsNavKey =
|
||||||
|
GlobalKey<NavigatorState>(debugLabel: 'legacySettings');
|
||||||
|
|
||||||
|
final _dashboardHomeNavKey =
|
||||||
|
GlobalKey<NavigatorState>(debugLabel: 'dashboardHome');
|
||||||
|
final _dashboardActivityNavKey =
|
||||||
|
GlobalKey<NavigatorState>(debugLabel: 'dashboardActivity');
|
||||||
|
final _dashboardNotificationsNavKey =
|
||||||
|
GlobalKey<NavigatorState>(debugLabel: 'dashboardNotifications');
|
||||||
|
final _dashboardProfileNavKey =
|
||||||
|
GlobalKey<NavigatorState>(debugLabel: 'dashboardProfile');
|
||||||
|
|
||||||
late final GoRouter appRouter;
|
late final GoRouter appRouter;
|
||||||
|
|
||||||
void configureAppRouter() {
|
void configureAppRouter() {
|
||||||
@@ -40,6 +59,7 @@ void configureAppRouter() {
|
|||||||
},
|
},
|
||||||
branches: [
|
branches: [
|
||||||
StatefulShellBranch(
|
StatefulShellBranch(
|
||||||
|
navigatorKey: _legacyControlPanelNavKey,
|
||||||
routes: [
|
routes: [
|
||||||
GoRoute(
|
GoRoute(
|
||||||
path: AppRoutes.controlPanel,
|
path: AppRoutes.controlPanel,
|
||||||
@@ -88,6 +108,7 @@ void configureAppRouter() {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
StatefulShellBranch(
|
StatefulShellBranch(
|
||||||
|
navigatorKey: _legacyDeviceMgmtNavKey,
|
||||||
routes: [
|
routes: [
|
||||||
GoRoute(
|
GoRoute(
|
||||||
path: AppRoutes.deviceManagement,
|
path: AppRoutes.deviceManagement,
|
||||||
@@ -156,6 +177,7 @@ void configureAppRouter() {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
StatefulShellBranch(
|
StatefulShellBranch(
|
||||||
|
navigatorKey: _legacyLocationNavKey,
|
||||||
routes: [
|
routes: [
|
||||||
GoRoute(
|
GoRoute(
|
||||||
path: AppRoutes.legacyLocation,
|
path: AppRoutes.legacyLocation,
|
||||||
@@ -166,6 +188,7 @@ void configureAppRouter() {
|
|||||||
),
|
),
|
||||||
// TODO: Añadir branch para Chat (tab 4)
|
// TODO: Añadir branch para Chat (tab 4)
|
||||||
StatefulShellBranch(
|
StatefulShellBranch(
|
||||||
|
navigatorKey: _legacyChatNavKey,
|
||||||
routes: [
|
routes: [
|
||||||
GoRoute(
|
GoRoute(
|
||||||
path: '${AppRoutes.legacyDashboard}/chat',
|
path: '${AppRoutes.legacyDashboard}/chat',
|
||||||
@@ -180,6 +203,7 @@ void configureAppRouter() {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
StatefulShellBranch(
|
StatefulShellBranch(
|
||||||
|
navigatorKey: _legacySettingsNavKey,
|
||||||
routes: [
|
routes: [
|
||||||
GoRoute(
|
GoRoute(
|
||||||
path: AppRoutes.settings,
|
path: AppRoutes.settings,
|
||||||
@@ -355,6 +379,7 @@ void configureAppRouter() {
|
|||||||
},
|
},
|
||||||
branches: [
|
branches: [
|
||||||
StatefulShellBranch(
|
StatefulShellBranch(
|
||||||
|
navigatorKey: _dashboardHomeNavKey,
|
||||||
routes: [
|
routes: [
|
||||||
GoRoute(
|
GoRoute(
|
||||||
path: AppRoutes.dashboardHome,
|
path: AppRoutes.dashboardHome,
|
||||||
@@ -427,6 +452,7 @@ void configureAppRouter() {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
StatefulShellBranch(
|
StatefulShellBranch(
|
||||||
|
navigatorKey: _dashboardActivityNavKey,
|
||||||
routes: [
|
routes: [
|
||||||
GoRoute(
|
GoRoute(
|
||||||
path: AppRoutes.dashboardActivity,
|
path: AppRoutes.dashboardActivity,
|
||||||
@@ -436,6 +462,7 @@ void configureAppRouter() {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
StatefulShellBranch(
|
StatefulShellBranch(
|
||||||
|
navigatorKey: _dashboardNotificationsNavKey,
|
||||||
routes: [
|
routes: [
|
||||||
GoRoute(
|
GoRoute(
|
||||||
path: AppRoutes.dashboardNotifications,
|
path: AppRoutes.dashboardNotifications,
|
||||||
@@ -445,6 +472,7 @@ void configureAppRouter() {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
StatefulShellBranch(
|
StatefulShellBranch(
|
||||||
|
navigatorKey: _dashboardProfileNavKey,
|
||||||
routes: [
|
routes: [
|
||||||
GoRoute(
|
GoRoute(
|
||||||
path: AppRoutes.dashboardProfile,
|
path: AppRoutes.dashboardProfile,
|
||||||
|
|||||||
Reference in New Issue
Block a user