Merge remote-tracking branch 'origin/develop' into components
# Conflicts: # apps/mobile_app/lib/navigation/app_router.dart # apps/mobile_app/pubspec.yaml # modules/auth/lib/src/device_sign_up/add_kid_screen.dart # modules/auth/lib/src/login/presentation/link_phone_screen.dart # modules/auth/lib/src/login/presentation/login_screen.dart # modules/auth/lib/src/login/presentation/phone_code_screen.dart # modules/auth/lib/src/onboarding/presentation/welcome_screen.dart # modules/auth/lib/src/recover_password/presentation/new_password_screen.dart # modules/auth/lib/src/sign_up/signup_screen.dart # modules/home/lib/src/presentation/deposit_screen.dart # modules/home/lib/src/presentation/home_screen.dart # modules/home/lib/src/presentation/wage_screen.dart # modules/notifications/lib/src/core/activity_list.dart # packages/design_system/lib/design_system.dart
This commit is contained in:
@@ -10,7 +10,7 @@ class AddKidScreen extends ConsumerWidget {
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final theme = ref.watch(themePortProvider);
|
||||
|
||||
|
||||
return Scaffold(
|
||||
backgroundColor: theme.getColorFor(ThemeCode.backgroundPrimary),
|
||||
body: Container(
|
||||
|
||||
@@ -63,7 +63,7 @@ class LinkPhoneScreen extends ConsumerWidget {
|
||||
],
|
||||
),
|
||||
PrimaryButton(
|
||||
onPressed: () => navigationContract.pushTo('/phone_code'),
|
||||
onPressed: () => navigationContract.pushTo(AppRoutes.phoneCode),
|
||||
text: "Siguiente",
|
||||
color: theme.getColorFor(ThemeCode.buttonPrimary),
|
||||
),
|
||||
|
||||
@@ -4,16 +4,24 @@ import 'package:design_system/design_system.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:navigation/navigation.dart';
|
||||
import 'package:sf_localizations/sf_localizations.dart';
|
||||
|
||||
class LoginScreen extends ConsumerWidget {
|
||||
class LoginScreen extends ConsumerStatefulWidget {
|
||||
final NavigationContract navigationContract;
|
||||
|
||||
const LoginScreen({super.key, required this.navigationContract});
|
||||
|
||||
@override
|
||||
ConsumerState<ConsumerStatefulWidget> createState() => _LoginScreenState();
|
||||
}
|
||||
|
||||
class _LoginScreenState extends ConsumerState<LoginScreen>{
|
||||
bool passwordVisible = false;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final theme = ref.watch(themePortProvider);
|
||||
|
||||
|
||||
bool passwordVisible = true;
|
||||
|
||||
final content = [
|
||||
@@ -51,7 +59,7 @@ class LoginScreen extends ConsumerWidget {
|
||||
child: CustomTextButton(
|
||||
text: "¿Has olvidado la contraseña?",
|
||||
onPressed: () =>
|
||||
navigationContract.pushTo('/recover_password'),
|
||||
widget.navigationContract.pushTo('/recover_password'),
|
||||
size: 16,
|
||||
)),
|
||||
],
|
||||
@@ -59,7 +67,7 @@ class LoginScreen extends ConsumerWidget {
|
||||
],
|
||||
),
|
||||
PrimaryButton(
|
||||
onPressed: () => navigationContract.goTo('/main/home'),
|
||||
onPressed: () => widget.navigationContract.goTo('/main/home'),
|
||||
text: "Iniciar sesión",
|
||||
color: theme.getColorFor(ThemeCode.buttonPrimary)
|
||||
),
|
||||
@@ -73,7 +81,7 @@ class LoginScreen extends ConsumerWidget {
|
||||
Align(
|
||||
alignment: Alignment.center,
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 14),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 14),
|
||||
color: theme.getColorFor(ThemeCode.backgroundPrimary),
|
||||
child: Text("o continúa con"),
|
||||
)
|
||||
@@ -116,7 +124,7 @@ class LoginScreen extends ConsumerWidget {
|
||||
style: TextStyle(fontSize: 18, letterSpacing: 0)
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () => navigationContract.goTo('/signup'),
|
||||
onPressed: () => widget.navigationContract.goTo(AppRoutes.signup),
|
||||
child: Text(
|
||||
"Crear una ahora",
|
||||
style: TextStyle(fontSize: 18, fontWeight: FontWeight.w500, letterSpacing: 0)
|
||||
|
||||
@@ -4,90 +4,44 @@ import 'package:flutter_svg/svg.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:navigation/navigation.dart';
|
||||
|
||||
class WelcomeScreen extends ConsumerStatefulWidget {
|
||||
class WelcomeScreen extends ConsumerWidget {
|
||||
final NavigationContract navigationContract;
|
||||
|
||||
const WelcomeScreen({super.key, required this.navigationContract});
|
||||
|
||||
@override
|
||||
ConsumerState<ConsumerStatefulWidget> createState() => WelcomeScreenState(navigationContract: navigationContract);
|
||||
|
||||
}
|
||||
|
||||
class WelcomeScreenState extends ConsumerState{
|
||||
late int currentStep;
|
||||
final NavigationContract navigationContract;
|
||||
|
||||
WelcomeScreenState({required this.navigationContract});
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
currentStep = 0;
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final theme = ref.watch(themePortProvider);
|
||||
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
return Scaffold(
|
||||
backgroundColor: theme.getColorFor(ThemeCode.backgroundPrimary),
|
||||
body: Container(
|
||||
padding: EdgeInsets.only(top: 24),
|
||||
child: Center(
|
||||
child: Column(
|
||||
spacing: 48,
|
||||
children: [
|
||||
Spacer(),
|
||||
generateSteps()[currentStep],
|
||||
Column(
|
||||
spacing: 24,
|
||||
children: [
|
||||
StepIndicator(
|
||||
max: 3,
|
||||
current: currentStep+1,
|
||||
color: theme.getColorFor(ThemeCode.buttonSecondary)
|
||||
),
|
||||
generateButtons(theme, 3, currentStep+1)
|
||||
]
|
||||
body: Center(
|
||||
child: Column(
|
||||
children: [
|
||||
Spacer(),
|
||||
Expanded(
|
||||
child: CarouselView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
itemExtent: double.infinity,
|
||||
itemSnapping: true,
|
||||
shrinkExtent: 400,
|
||||
children: generateSteps(),
|
||||
),
|
||||
Spacer()
|
||||
]
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
FilledButton(
|
||||
onPressed: () => navigationContract.goTo(AppRoutes.linkPhone),
|
||||
child: const Text('Continuar'),
|
||||
),
|
||||
Spacer(),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget generateButtons(ThemePort theme, int max, int step){
|
||||
if (step==max) {
|
||||
return PrimaryButton(
|
||||
onPressed: () => navigationContract.goTo('/link_phone'),
|
||||
text: "Continuar",
|
||||
color: theme.getColorFor(ThemeCode.buttonPrimary),
|
||||
width: 324,
|
||||
);
|
||||
} else {
|
||||
return Column(
|
||||
spacing: 16,
|
||||
children: [
|
||||
PrimaryButton(
|
||||
onPressed: ()=>setState(() {
|
||||
currentStep++;
|
||||
}),
|
||||
text: "Siguiente",
|
||||
color: theme.getColorFor(ThemeCode.buttonSecondary),
|
||||
width: 324,
|
||||
),
|
||||
CustomTextButton(
|
||||
onPressed: ()=>navigationContract.goTo('/link_phone'),
|
||||
text: "Omitir",
|
||||
size: 18,
|
||||
weight: FontWeight.w500,
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
void jumpToNext(BuildContext context) {
|
||||
// Navigator.pushReplacement(
|
||||
// context,
|
||||
// MaterialPageRoute(builder: (_) => LinkPhoneScreen()),
|
||||
// );
|
||||
return;
|
||||
}
|
||||
|
||||
List<Widget> generateSteps() {
|
||||
@@ -99,12 +53,12 @@ class WelcomeScreenState extends ConsumerState{
|
||||
Column(
|
||||
spacing: 16,
|
||||
children: [
|
||||
Text(
|
||||
const Text(
|
||||
"Aprende a gestionar su dinero",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(fontSize: 30, fontWeight: FontWeight.w500, letterSpacing: 0)
|
||||
),
|
||||
Text(
|
||||
const Text(
|
||||
"Tu peque crea hábitos y se divierte mientras lo hace",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(fontSize: 18, letterSpacing: 0)
|
||||
@@ -120,12 +74,12 @@ class WelcomeScreenState extends ConsumerState{
|
||||
Column(
|
||||
spacing: 16,
|
||||
children: [
|
||||
Text(
|
||||
const Text(
|
||||
"Tranquilidad en cada pago que hace",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(fontSize: 30, fontWeight: FontWeight.w500, letterSpacing: 0)
|
||||
),
|
||||
Text(
|
||||
const Text(
|
||||
"Supervisa sus gastos, fija límites y acompáñale en cada paso",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(fontSize: 18, letterSpacing: 0)
|
||||
@@ -141,12 +95,12 @@ class WelcomeScreenState extends ConsumerState{
|
||||
Column(
|
||||
spacing: 16,
|
||||
children: [
|
||||
Text(
|
||||
const Text(
|
||||
"Pagos fáciles y seguros, en sus manos",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(fontSize: 30, fontWeight: FontWeight.w500, letterSpacing: 0)
|
||||
),
|
||||
Text(
|
||||
const Text(
|
||||
"Podrá pagar desde su reloj.\n Sin móvil ni efectivo",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(fontSize: 18, letterSpacing: 0)
|
||||
|
||||
@@ -14,26 +14,27 @@ class NewPasswordScreen extends ConsumerStatefulWidget {
|
||||
class NewPasswordScreenState extends ConsumerState<NewPasswordScreen> {
|
||||
bool passwordVisible = false;
|
||||
bool equalPasswords = false;
|
||||
String password = "";
|
||||
var securityChecks = {
|
||||
"min": false,
|
||||
"capital": false,
|
||||
"number": false,
|
||||
"special": false,
|
||||
String password = '';
|
||||
|
||||
Map<String, bool> securityChecks = {
|
||||
'min': false,
|
||||
'capital': false,
|
||||
'number': false,
|
||||
'special': false,
|
||||
};
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
passwordVisible = false;
|
||||
equalPasswords = false;
|
||||
password = "";
|
||||
password = '';
|
||||
securityChecks = {
|
||||
"min": false,
|
||||
"capital": false,
|
||||
"number": false,
|
||||
"special": false,
|
||||
'min': false,
|
||||
'capital': false,
|
||||
'number': false,
|
||||
'special': false,
|
||||
};
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -44,16 +45,16 @@ class NewPasswordScreenState extends ConsumerState<NewPasswordScreen> {
|
||||
return Scaffold(
|
||||
backgroundColor: theme.getColorFor(ThemeCode.backgroundPrimary),
|
||||
body: Container(
|
||||
padding: EdgeInsets.all(24),
|
||||
margin: const EdgeInsets.all(24),
|
||||
child: Center(
|
||||
child: Column(
|
||||
spacing: 48,
|
||||
children: [
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
Column(
|
||||
spacing: 32,
|
||||
children: [
|
||||
Text(
|
||||
const Text(
|
||||
"Recuperar contraseña",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(fontWeight: FontWeight.w500, fontSize: 30, letterSpacing: 0),
|
||||
@@ -94,7 +95,7 @@ class NewPasswordScreenState extends ConsumerState<NewPasswordScreen> {
|
||||
? ThemeCode.buttonPrimary
|
||||
: ThemeCode.buttonSecondary),
|
||||
),
|
||||
Text("Al menos 8 caracteres", style: TextStyle(fontSize: 14)),
|
||||
const Text("Al menos 8 caracteres", style: TextStyle(fontSize: 14)),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
@@ -106,7 +107,7 @@ class NewPasswordScreenState extends ConsumerState<NewPasswordScreen> {
|
||||
? ThemeCode.buttonPrimary
|
||||
: ThemeCode.buttonSecondary),
|
||||
),
|
||||
Text("Una mayúscula", style: TextStyle(fontSize: 14)),
|
||||
const Text("Una mayúscula", style: TextStyle(fontSize: 14)),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
@@ -118,7 +119,7 @@ class NewPasswordScreenState extends ConsumerState<NewPasswordScreen> {
|
||||
? ThemeCode.buttonPrimary
|
||||
: ThemeCode.buttonSecondary),
|
||||
),
|
||||
Text("Un número", style: TextStyle(fontSize: 14)),
|
||||
const Text("Un número", style: TextStyle(fontSize: 14)),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
@@ -130,7 +131,7 @@ class NewPasswordScreenState extends ConsumerState<NewPasswordScreen> {
|
||||
? ThemeCode.buttonPrimary
|
||||
: ThemeCode.buttonSecondary),
|
||||
),
|
||||
Text("Un carácter especial", style: TextStyle(fontSize: 14)),
|
||||
const Text("Un carácter especial", style: TextStyle(fontSize: 14)),
|
||||
],
|
||||
),
|
||||
],
|
||||
@@ -142,7 +143,7 @@ class NewPasswordScreenState extends ConsumerState<NewPasswordScreen> {
|
||||
children: [
|
||||
Align(
|
||||
alignment: Alignment.bottomLeft,
|
||||
child: Text(
|
||||
child: const Text(
|
||||
"Teléfono móvil",
|
||||
style: TextStyle(fontSize: 14, letterSpacing: 0),
|
||||
)
|
||||
@@ -172,7 +173,7 @@ class NewPasswordScreenState extends ConsumerState<NewPasswordScreen> {
|
||||
text: "Aceptar",
|
||||
color: theme.getColorFor(ThemeCode.buttonPrimary)
|
||||
),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -182,13 +183,11 @@ class NewPasswordScreenState extends ConsumerState<NewPasswordScreen> {
|
||||
|
||||
//TODO: Extraer de la vista
|
||||
Map<String, bool> checkSecurity(String value) {
|
||||
Map<String, bool> checks = {};
|
||||
|
||||
checks["min"] = value.length >= 8;
|
||||
checks["capital"] = RegExp(r'[A-Z]').hasMatch(value);
|
||||
checks["number"] = RegExp(r'[0-9]').hasMatch(value);
|
||||
checks["special"] = RegExp(r'[^A-Za-z0-9]').hasMatch(value);
|
||||
|
||||
return checks;
|
||||
return {
|
||||
'min': value.length >= 8,
|
||||
'capital': RegExp(r'[A-Z]').hasMatch(value),
|
||||
'number': RegExp(r'[0-9]').hasMatch(value),
|
||||
'special': RegExp(r'[^A-Za-z0-9]').hasMatch(value),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,29 +17,19 @@ class SignupScreen extends ConsumerStatefulWidget {
|
||||
super.key,
|
||||
required this.navigationContract
|
||||
});
|
||||
|
||||
ConsumerState<SignupScreen> createState() => SignupScreenState(navigationContract);
|
||||
@override
|
||||
ConsumerState<SignupScreen> createState() => _SignupScreenState();
|
||||
}
|
||||
|
||||
class SignupScreenState extends ConsumerState<SignupScreen> {
|
||||
late int currentStep;
|
||||
late bool acceptTerms;
|
||||
final NavigationContract navigationContract;
|
||||
|
||||
SignupScreenState(this.navigationContract);
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
currentStep = 0;
|
||||
acceptTerms = false;
|
||||
}
|
||||
class _SignupScreenState extends ConsumerState<SignupScreen> {
|
||||
int currentStep = 0;
|
||||
bool acceptTerms = false;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return getSteps()[currentStep];
|
||||
}
|
||||
|
||||
|
||||
List<Widget> getSteps() {
|
||||
final theme = ref.watch(themePortProvider);
|
||||
|
||||
@@ -118,7 +108,7 @@ class SignupScreenState extends ConsumerState<SignupScreen> {
|
||||
currentStep--;
|
||||
})},
|
||||
),
|
||||
AccountCreatedScreen(navigationContract: navigationContract, kidAccount: false)
|
||||
AccountCreatedScreen(navigationContract: widget.navigationContract, kidAccount: false)
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,8 @@ dependencies:
|
||||
path: ../../packages/design_system
|
||||
navigation:
|
||||
path: ../../packages/navigation
|
||||
sf_localizations:
|
||||
path: ../../packages/sf_localizations
|
||||
#dependencies go here
|
||||
flutter_svg: ^2.2.1
|
||||
get_it: ^9.0.5
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# melos_managed_dependency_overrides: dashboard_shell,design_system,home,notifications,profile,sf_shared,navigation
|
||||
# melos_managed_dependency_overrides: dashboard_shell,design_system,home,notifications,profile,sf_shared,navigation,utils,sf_localizations
|
||||
dependency_overrides:
|
||||
dashboard_shell:
|
||||
path: ../dashboard_shell
|
||||
@@ -12,5 +12,9 @@ dependency_overrides:
|
||||
path: ../notifications
|
||||
profile:
|
||||
path: ../profile
|
||||
sf_localizations:
|
||||
path: ../../packages/sf_localizations
|
||||
sf_shared:
|
||||
path: ../../packages/sf_shared
|
||||
utils:
|
||||
path: ../../packages/utils
|
||||
|
||||
Reference in New Issue
Block a user