Compare commits
3 Commits
feature/co
...
set-reset-
| Author | SHA1 | Date | |
|---|---|---|---|
| c80b7a9a5f | |||
| db153bb38d | |||
| 50c4529cba |
@@ -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,
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ class OnboardingScreen extends ConsumerWidget {
|
|||||||
|
|
||||||
void goToNext() {
|
void goToNext() {
|
||||||
if (isLast) {
|
if (isLast) {
|
||||||
navigationContract.goTo(AppRoutes.legacyLogin);
|
navigationContract.goTo(AppRoutes.login);
|
||||||
} else {
|
} else {
|
||||||
pageController.nextPage(
|
pageController.nextPage(
|
||||||
duration: const Duration(milliseconds: 400),
|
duration: const Duration(milliseconds: 400),
|
||||||
@@ -111,7 +111,7 @@ class OnboardingScreen extends ConsumerWidget {
|
|||||||
? const SizedBox.shrink()
|
? const SizedBox.shrink()
|
||||||
: TextButton(
|
: TextButton(
|
||||||
onPressed: () =>
|
onPressed: () =>
|
||||||
navigationContract.goTo(AppRoutes.legacyLogin),
|
navigationContract.goTo(AppRoutes.login),
|
||||||
child: Text(
|
child: Text(
|
||||||
context.translate(I18n.skip),
|
context.translate(I18n.skip),
|
||||||
style: AppFonts.stolzlStyle(
|
style: AppFonts.stolzlStyle(
|
||||||
|
|||||||
@@ -495,7 +495,6 @@ class SignUpViewModel extends Notifier<SignUpViewState> {
|
|||||||
String _emailErrorFor(String value) {
|
String _emailErrorFor(String value) {
|
||||||
final email = value.trim();
|
final email = value.trim();
|
||||||
if (email.isEmpty) return I18n.errorEmailRequired;
|
if (email.isEmpty) return I18n.errorEmailRequired;
|
||||||
if (email.contains('+')) return I18n.errorEmailPlusNotAllowed;
|
|
||||||
if (!_isValidEmail(email)) return I18n.errorEmailInvalid;
|
if (!_isValidEmail(email)) return I18n.errorEmailInvalid;
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ mixin SignUpFormValidation {
|
|||||||
String emailErrorFor(String value) {
|
String emailErrorFor(String value) {
|
||||||
final email = value.trim();
|
final email = value.trim();
|
||||||
if (email.isEmpty) return I18n.errorEmailRequired;
|
if (email.isEmpty) return I18n.errorEmailRequired;
|
||||||
if (email.contains('+')) return I18n.errorEmailPlusNotAllowed;
|
|
||||||
if (!_emailRegex.hasMatch(email)) return I18n.errorEmailInvalid;
|
if (!_emailRegex.hasMatch(email)) return I18n.errorEmailInvalid;
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user