Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions app/lib/presentation/navigation/routers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import 'package:app/presentation/ui/custom/debug_banner.dart';
import 'package:app/presentation/ui/pages/main/home/home_page.dart';
import 'package:app/presentation/ui/pages/auth/login/login_page.dart';
import 'package:app/presentation/ui/pages/auth/sign_up/sign_up_page.dart';
import 'package:app/presentation/ui/pages/onboarding/onboarding_page.dart';
import 'package:app/presentation/ui/pages/splash/splash_page.dart';
import 'package:common/core/resource.dart';
import 'package:domain/bloc/auth/auth_cubit.dart';
Expand All @@ -14,6 +15,7 @@ import 'package:go_router/go_router.dart';

enum Routes {
auth,
onboarding,
login,
signup,
app,
Expand Down Expand Up @@ -50,7 +52,7 @@ class Routers {
initialLocation: initialLocation ??
(getIt<AuthCubit>().isLoggedIn()
? Routes.app.path
: Routes.auth.path),
: Routes.onboarding.path),
routes: [
GoRoute(
path: '/',
Expand Down Expand Up @@ -79,7 +81,7 @@ class Routers {
return;
}
debugPrint('Navigating to auth route');
Routes.auth.go(context);
Routes.onboarding.go(context);
break;
case _:
}
Expand All @@ -93,6 +95,11 @@ class Routers {
builder: (context, state, child) =>
kDebugMode ? DebugBanner(child: child) : child,
routes: [
GoRoute(
name: Routes.onboarding.name,
path: Routes.onboarding.path,
builder: (context, state) => const OnboardingPage(),
),
GoRoute(
name: Routes.auth.name,
path: Routes.auth.path,
Expand Down
1 change: 1 addition & 0 deletions app/lib/presentation/resources/dim.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ class Dimen {
static const spacingXxxl = 48.0;

static const double buttonHeightM = 48.0;
static const double onboardingIconSize = 120.0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ typedef String MessageIfAbsent(String messageStr, List<dynamic> args);
class MessageLookup extends MessageLookupByLibrary {
String get localeName => 'en';

static String m0(currentPage, totalPages) =>
"Page ${currentPage} of ${totalPages}";

final messages = _notInlinedMessages(_notInlinedMessages);
static Map<String, Function> _notInlinedMessages(_) => <String, Function>{
"appName": MessageLookupByLibrary.simpleMessage("Flutter Target"),
Expand Down Expand Up @@ -70,6 +73,26 @@ class MessageLookup extends MessageLookupByLibrary {
"Invalid email or password.",
),
"noConnection": MessageLookupByLibrary.simpleMessage("No connection"),
"onboardingBack": MessageLookupByLibrary.simpleMessage("Back"),
"onboardingNext": MessageLookupByLibrary.simpleMessage("Next"),
"onboardingPage1Description": MessageLookupByLibrary.simpleMessage(
"This is the first page of the onboarding flow",
),
"onboardingPage1Title": MessageLookupByLibrary.simpleMessage("Welcome"),
"onboardingPage2Description": MessageLookupByLibrary.simpleMessage(
"This is the second page of the onboarding flow",
),
"onboardingPage2Title": MessageLookupByLibrary.simpleMessage("Discover"),
"onboardingPage3Description": MessageLookupByLibrary.simpleMessage(
"This is the third page of the onboarding flow",
),
"onboardingPage3Title": MessageLookupByLibrary.simpleMessage("Connect"),
"onboardingPage4Description": MessageLookupByLibrary.simpleMessage(
"This is the fourth page of the onboarding flow",
),
"onboardingPage4Title": MessageLookupByLibrary.simpleMessage("Get Started"),
"onboardingPageIndicator": m0,
"onboardingStart": MessageLookupByLibrary.simpleMessage("Start"),
"passwordInstructions": MessageLookupByLibrary.simpleMessage(
"Min 8 characters long: 1 uppercase letter, 1 lowercase letter, 1 number, and 1 special character.",
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ typedef String MessageIfAbsent(String messageStr, List<dynamic> args);
class MessageLookup extends MessageLookupByLibrary {
String get localeName => 'es';

static String m0(currentPage, totalPages) =>
"Página ${currentPage} de ${totalPages}";

final messages = _notInlinedMessages(_notInlinedMessages);
static Map<String, Function> _notInlinedMessages(_) => <String, Function>{
"appName": MessageLookupByLibrary.simpleMessage("Flutter Target"),
Expand Down Expand Up @@ -72,6 +75,26 @@ class MessageLookup extends MessageLookupByLibrary {
"Correo electrónico o contraseña incorrectos.",
),
"noConnection": MessageLookupByLibrary.simpleMessage("Sin conexión"),
"onboardingBack": MessageLookupByLibrary.simpleMessage("Atrás"),
"onboardingNext": MessageLookupByLibrary.simpleMessage("Siguiente"),
"onboardingPage1Description": MessageLookupByLibrary.simpleMessage(
"Esta es la primera página del flujo de incorporación",
),
"onboardingPage1Title": MessageLookupByLibrary.simpleMessage("Bienvenido"),
"onboardingPage2Description": MessageLookupByLibrary.simpleMessage(
"Esta es la segunda página del flujo de incorporación",
),
"onboardingPage2Title": MessageLookupByLibrary.simpleMessage("Descubrir"),
"onboardingPage3Description": MessageLookupByLibrary.simpleMessage(
"Esta es la tercera página del flujo de incorporación",
),
"onboardingPage3Title": MessageLookupByLibrary.simpleMessage("Conectar"),
"onboardingPage4Description": MessageLookupByLibrary.simpleMessage(
"Esta es la cuarta página del flujo de incorporación",
),
"onboardingPage4Title": MessageLookupByLibrary.simpleMessage("Comenzar"),
"onboardingPageIndicator": m0,
"onboardingStart": MessageLookupByLibrary.simpleMessage("Comenzar"),
"passwordInstructions": MessageLookupByLibrary.simpleMessage(
"Mínimo 8 caracteres: 1 mayúscula, 1 minúscula, 1 número y 1 carácter especial.",
),
Expand Down
105 changes: 105 additions & 0 deletions app/lib/presentation/resources/locale/generated/l10n.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 14 additions & 2 deletions app/lib/presentation/resources/locale/intl_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,17 @@
"debugModeResetAppTitle": "Reset App",
"debugModeResetAppMessage": "Are you sure you want to reset the app?",
"debugModeCancel": "Cancel",
"debugModeConfirm": "Confirm"
}
"debugModeConfirm": "Confirm",
"onboardingBack": "Back",
"onboardingNext": "Next",
"onboardingStart": "Start",
"onboardingPage1Title": "Welcome",
"onboardingPage1Description": "This is the first page of the onboarding flow",
"onboardingPage2Title": "Discover",
"onboardingPage2Description": "This is the second page of the onboarding flow",
"onboardingPage3Title": "Connect",
"onboardingPage3Description": "This is the third page of the onboarding flow",
"onboardingPage4Title": "Get Started",
"onboardingPage4Description": "This is the fourth page of the onboarding flow",
"onboardingPageIndicator": "Page {currentPage} of {totalPages}"
}
14 changes: 13 additions & 1 deletion app/lib/presentation/resources/locale/intl_es.arb
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,17 @@
"debugModeResetAppTitle": "Resetear App",
"debugModeResetAppMessage": "¿Estás seguro de que deseas resetear la aplicación?",
"debugModeCancel": "Cancelar",
"debugModeConfirm": "Confirmar"
"debugModeConfirm": "Confirmar",
"onboardingBack": "Atrás",
"onboardingNext": "Siguiente",
"onboardingStart": "Comenzar",
"onboardingPage1Title": "Bienvenido",
"onboardingPage1Description": "Esta es la primera página del flujo de incorporación",
"onboardingPage2Title": "Descubrir",
"onboardingPage2Description": "Esta es la segunda página del flujo de incorporación",
"onboardingPage3Title": "Conectar",
"onboardingPage3Description": "Esta es la tercera página del flujo de incorporación",
"onboardingPage4Title": "Comenzar",
"onboardingPage4Description": "Esta es la cuarta página del flujo de incorporación",
"onboardingPageIndicator": "Página {currentPage} de {totalPages}"
}
9 changes: 2 additions & 7 deletions app/lib/presentation/ui/pages/auth/login/login_form.dart
Original file line number Diff line number Diff line change
Expand Up @@ -72,18 +72,13 @@ class _LoginFormState extends State<LoginForm> {
obscureText: true,
controller: passwordController,
validator: (value) {
if (!FormValidator.isStrongPassword(value)) {
return S.of(context).errorPasswordWeak;
if (value?.trim().isEmpty ?? true) {
return S.of(context).errorPasswordRequired;
}
return null;
},
),
const Gap(Dimen.spacingM),
Text(
S.of(context).passwordInstructions,
style: Theme.of(context).textTheme.bodySmall,
),
const Gap(Dimen.spacingM),
TermsServicesCheck(
agreeToTerms: agreeToTerms,
onChanged: (value) {
Expand Down
Loading