fix
This commit is contained in:
@@ -39,7 +39,7 @@ Future<void> initApp(EnvironmentEnum env) async {
|
||||
await GetIt.I<TreezorWalletConnectionService>().logout();
|
||||
} catch (_) {}
|
||||
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 _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;
|
||||
|
||||
void configureAppRouter() {
|
||||
@@ -40,6 +59,7 @@ void configureAppRouter() {
|
||||
},
|
||||
branches: [
|
||||
StatefulShellBranch(
|
||||
navigatorKey: _legacyControlPanelNavKey,
|
||||
routes: [
|
||||
GoRoute(
|
||||
path: AppRoutes.controlPanel,
|
||||
@@ -88,6 +108,7 @@ void configureAppRouter() {
|
||||
],
|
||||
),
|
||||
StatefulShellBranch(
|
||||
navigatorKey: _legacyDeviceMgmtNavKey,
|
||||
routes: [
|
||||
GoRoute(
|
||||
path: AppRoutes.deviceManagement,
|
||||
@@ -156,6 +177,7 @@ void configureAppRouter() {
|
||||
],
|
||||
),
|
||||
StatefulShellBranch(
|
||||
navigatorKey: _legacyLocationNavKey,
|
||||
routes: [
|
||||
GoRoute(
|
||||
path: AppRoutes.legacyLocation,
|
||||
@@ -166,6 +188,7 @@ void configureAppRouter() {
|
||||
),
|
||||
// TODO: Añadir branch para Chat (tab 4)
|
||||
StatefulShellBranch(
|
||||
navigatorKey: _legacyChatNavKey,
|
||||
routes: [
|
||||
GoRoute(
|
||||
path: '${AppRoutes.legacyDashboard}/chat',
|
||||
@@ -180,6 +203,7 @@ void configureAppRouter() {
|
||||
],
|
||||
),
|
||||
StatefulShellBranch(
|
||||
navigatorKey: _legacySettingsNavKey,
|
||||
routes: [
|
||||
GoRoute(
|
||||
path: AppRoutes.settings,
|
||||
@@ -355,6 +379,7 @@ void configureAppRouter() {
|
||||
},
|
||||
branches: [
|
||||
StatefulShellBranch(
|
||||
navigatorKey: _dashboardHomeNavKey,
|
||||
routes: [
|
||||
GoRoute(
|
||||
path: AppRoutes.dashboardHome,
|
||||
@@ -427,6 +452,7 @@ void configureAppRouter() {
|
||||
],
|
||||
),
|
||||
StatefulShellBranch(
|
||||
navigatorKey: _dashboardActivityNavKey,
|
||||
routes: [
|
||||
GoRoute(
|
||||
path: AppRoutes.dashboardActivity,
|
||||
@@ -436,6 +462,7 @@ void configureAppRouter() {
|
||||
],
|
||||
),
|
||||
StatefulShellBranch(
|
||||
navigatorKey: _dashboardNotificationsNavKey,
|
||||
routes: [
|
||||
GoRoute(
|
||||
path: AppRoutes.dashboardNotifications,
|
||||
@@ -445,6 +472,7 @@ void configureAppRouter() {
|
||||
],
|
||||
),
|
||||
StatefulShellBranch(
|
||||
navigatorKey: _dashboardProfileNavKey,
|
||||
routes: [
|
||||
GoRoute(
|
||||
path: AppRoutes.dashboardProfile,
|
||||
|
||||
Reference in New Issue
Block a user