Merge remote-tracking branch 'origin/auth-login-and-2fa-login' into auth-recover-password

# Conflicts:
#	modules/auth/lib/src/core/data/datasource/auth_remote_datasource.dart
#	modules/auth/lib/src/core/data/datasource/auth_remote_datasource_impl.dart
#	modules/auth/lib/src/core/data/repositories/auth_repository_impl.dart
#	modules/auth/lib/src/core/domain/repositories/auth_repository.dart
#	modules/auth/lib/src/features/recover_password/presentation/new_password_screen.dart
#	modules/auth/lib/src/features/recover_password/presentation/restore_password_screen.dart
#	packages/design_system/lib/src/inputs/textfields.dart
#	packages/sf_localizations/assets/l10n/de.json
#	packages/sf_localizations/assets/l10n/en.json
#	packages/sf_localizations/assets/l10n/es.json
#	packages/sf_localizations/assets/l10n/fr.json
#	packages/sf_localizations/assets/l10n/it.json
#	packages/sf_localizations/assets/l10n/pt.json
#	packages/sf_localizations/lib/src/generated/i18n.dart
This commit is contained in:
2025-12-19 12:13:41 +01:00
32 changed files with 1585 additions and 815 deletions

View File

@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
class PrimaryButton extends StatelessWidget {
final VoidCallback onPressed;
final VoidCallback? onPressed;
final String text;
final Color color;
final double height;
@@ -9,24 +9,35 @@ class PrimaryButton extends StatelessWidget {
final double size;
final double radius;
final double padding;
final Widget? leading;
final double leadingGap;
const PrimaryButton({
super.key,
required this.onPressed,
required this.text,
required this.color,
this.onPressed,
this.height = 60,
this.width,
this.size = 18,
this.radius = 18,
this.padding = 0,
this.leading,
this.leadingGap = 10,
});
@override
Widget build(BuildContext context) {
final bgResolver = WidgetStateProperty.resolveWith<Color>((states) {
if (states.contains(WidgetState.disabled)) {
return color.withValues(alpha: 0.5);
}
return color;
});
return FilledButton(
style: ButtonStyle(
backgroundColor: WidgetStatePropertyAll<Color>(color),
backgroundColor: bgResolver,
padding: WidgetStatePropertyAll<EdgeInsetsGeometry>(
EdgeInsets.symmetric(horizontal: padding),
),
@@ -40,17 +51,29 @@ class PrimaryButton extends StatelessWidget {
child: SizedBox(
width: width,
height: height,
child: Center(
child: Text(
text,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: size,
fontWeight: FontWeight.w500,
letterSpacing: 0,
color: Colors.white, // theme.getColorFor(ThemeCode.textSecondary)
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
// mainAxisSize: MainAxisSize.min,
children: [
if (leading != null) ...[
IconTheme.merge(
data: const IconThemeData(color: Colors.white, size: 20),
child: leading!,
),
SizedBox(width: leadingGap),
],
Text(
text,
overflow: TextOverflow.ellipsis,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: size,
fontWeight: FontWeight.w500,
letterSpacing: 0,
color: Colors.white,
),
),
),
],
),
),
);

View File

@@ -1,10 +1,11 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
class CustomTextField extends StatelessWidget {
final bool? showPassword;
final TextInputType keyboardType;
final TextInputAction? textInputAction;
final ValueChanged<String>? onSubmitted;
final VoidCallback? onVisibilityChanged;
final bool numeric;
final String hint;
final String label;
final double labelSize;
@@ -18,8 +19,10 @@ class CustomTextField extends StatelessWidget {
const CustomTextField({
super.key,
this.showPassword,
this.keyboardType = TextInputType.text,
this.textInputAction,
this.onSubmitted,
this.onVisibilityChanged,
this.numeric = false,
this.hint = '',
this.label = '',
this.labelSize = 14,
@@ -45,17 +48,14 @@ class CustomTextField extends StatelessWidget {
),
),
TextFormField(
controller: controller,
keyboardType: numeric
? TextInputType.number
: TextInputType.text,
onFieldSubmitted: widget.onSubmitted,
textInputAction: widget.textInputAction,
controller: widget.controller,
keyboardType: widget.keyboardType,
obscureText: !(showPassword ?? true),
enableSuggestions: (showPassword ?? true),
autocorrect: !(showPassword ?? true),
style: const TextStyle(color: Color(0xFF4B4B4B)),
inputFormatters: numeric
? <TextInputFormatter>[FilteringTextInputFormatter.digitsOnly]
: const <TextInputFormatter>[],
decoration: InputDecoration(
counterText: "",
hintText: hint,

View File

@@ -93,7 +93,11 @@ void main() {
)
..addScenario(
'numeric',
SizedBox(height: 70, width: 250, child: CustomTextField(numeric: true)),
SizedBox(
height: 70,
width: 250,
child: CustomTextField(keyboardType: TextInputType.number),
),
)
..addScenario(
'password',

View File

@@ -21,6 +21,17 @@
"enter": "Weiter",
"didNotReceiveIt": "Hast du es nicht erhalten?",
"tryAgain": "Erneut versuchen",
"welcome": "Wir heißen dich willkommen!",
"username": "Benutzername",
"password": "Passwort",
"forgotPassword": "Passwort vergessen?",
"signIn": "Anmelden",
"orContinueWith": "oder weiter mit",
"google": "Google",
"apple": "Apple",
"dontHaveAccount": "Du hast noch kein Konto?",
"createOneNow": "Jetzt eines erstellen",
"tryAgain": "Erneut versuchen",
"recoverPasswordTitle": "Passwort wiederherstellen",
"recoverPasswordSubtitle": "Geben Sie Ihre E-Mail-Adresse ein, um Ihnen einen Wiederherstellungslink zu senden",
"send": "Schicken",

View File

@@ -21,6 +21,17 @@
"enter": "Enter",
"didNotReceiveIt": "Didn't receive it?",
"tryAgain": "Try again",
"welcome": "Welcome!",
"username": "Username",
"password": "Password",
"forgotPassword": "Forgot your password?",
"signIn": "Sign in",
"orContinueWith": "or continue with",
"google": "Google",
"apple": "Apple",
"dontHaveAccount": "Don't have an account?",
"createOneNow": "Create one now",
"tryAgain": "Try again",
"recoverPasswordTitle": "Recover password",
"recoverPasswordSubtitle": "Insert your email to send you a recovery link",
"send": "Send",

View File

@@ -21,6 +21,17 @@
"enter": "enter",
"didNotReceiveIt": "¿No lo has recibido?",
"tryAgain": "Volver a intentarlo",
"welcome": "¡Te damos la bienvenida!",
"username": "Nombre de usuario",
"password": "Contraseña",
"forgotPassword": "¿Has olvidado la contraseña?",
"signIn": "Iniciar sesión",
"orContinueWith": "o continúa con",
"google": "Google",
"apple": "Apple",
"dontHaveAccount": "¿No tienes cuenta?",
"createOneNow": "Crear una ahora",
"tryAgain": "Volver a intentarlo",
"recoverPasswordTitle": "Recuperar contraseña",
"recoverPasswordSubtitle": "Introduce tu email para enviarte un enlace de recuperación",
"send": "Enviar",

View File

@@ -21,6 +21,17 @@
"enter": "Entrer",
"didNotReceiveIt": "Tu ne l'as pas reçu ?",
"tryAgain": "Réessayer",
"welcome": "Nous te souhaitons la bienvenue !",
"username": "Nom d'utilisateur",
"password": "Mot de passe",
"forgotPassword": "Mot de passe oublié ?",
"signIn": "Se connecter",
"orContinueWith": "ou continuer avec",
"google": "Google",
"apple": "Apple",
"dontHaveAccount": "Tu n'as pas de compte ?",
"createOneNow": "Crée-en un maintenant",
"tryAgain": "Réessayer",
"recoverPasswordTitle": "Récupérer le mot de passe",
"recoverPasswordSubtitle": "Entrez votre email pour vous envoyer un lien de récupération",
"send": "Envoyer",

View File

@@ -21,6 +21,17 @@
"enter": "Entra",
"didNotReceiveIt": "Non lo hai ricevuto?",
"tryAgain": "Riprova",
"welcome": "Ti diamo il benvenuto!",
"username": "Nome utente",
"password": "Password",
"forgotPassword": "Hai dimenticato la password?",
"signIn": "Accedi",
"orContinueWith": "o continua con",
"google": "Google",
"apple": "Apple",
"dontHaveAccount": "Non hai un account?",
"createOneNow": "Creane uno adesso",
"tryAgain": "Riprova",
"recoverPasswordTitle": "Recupera la password",
"recoverPasswordSubtitle": "Inserisci la tua email per inviarti un collegamento di recupero",
"send": "Inviare",

View File

@@ -21,6 +21,17 @@
"enter": "Entrar",
"didNotReceiveIt": "Você não recebeu?",
"tryAgain": "Tentar novamente",
"welcome": "Bem-vindo!",
"username": "Nome de usuário",
"password": "Senha",
"forgotPassword": "Esqueceu a senha?",
"signIn": "Iniciar sessão",
"orContinueWith": "ou continuar com",
"google": "Google",
"apple": "Apple",
"dontHaveAccount": "Não tem conta?",
"createOneNow": "Criar uma agora",
"tryAgain": "Tentar novamente",
"recoverPasswordTitle": "Recuperar senha",
"recoverPasswordSubtitle": "Insira seu e-mail para enviar um link de recuperação",
"send": "Enviar",

View File

@@ -3,6 +3,38 @@
class I18n {
const I18n._();
static const String example = 'example';
static const String start = 'start';
static const String next = 'next';
static const String skip = 'skip';
static const String onboardingTitle1 = 'onboardingTitle1';
static const String onboardingSubtitle1 = 'onboardingSubtitle1';
static const String onboardingTitle2 = 'onboardingTitle2';
static const String onboardingSubtitle2 = 'onboardingSubtitle2';
static const String onboardingTitle3 = 'onboardingTitle3';
static const String onboardingSubtitle3 = 'onboardingSubtitle3';
static const String linkPhoneTitle = 'linkPhoneTitle';
static const String linkPhoneSubtitle = 'linkPhoneSubtitle';
static const String mobilePhone = 'mobilePhone';
static const String phoneNumber = 'phoneNumber';
static const String selectYourCountry = 'selectYourCountry';
static const String errorMessagePhoneIsEmpty = 'errorMessagePhoneIsEmpty';
static const String connect = "connect";
static const String verificationCodeSentTo = "verificationCodeSentTo";
static const String enterCodeHere = "enterCodeHere";
static const String enter = "enter";
static const String didNotReceiveIt = "didNotReceiveIt";
static const String tryAgain = "tryAgain";
static const String welcome = "welcome";
static const String username = "username";
static const String password = "password";
static const String forgotPassword = "forgotPassword";
static const String signIn = "signIn";
static const String orContinueWith = "orContinueWith";
static const String google = "google";
static const String apple = "apple";
static const String dontHaveAccount = "dontHaveAccount";
static const String createOneNow = "createOneNow";
static const example = 'example';
static const onboardingTitle1 = 'onboardingTitle1';
static const onboardingSubtitle1 = 'onboardingSubtitle1';

View File

@@ -38,7 +38,7 @@ class DepositBlock extends ConsumerWidget {
child: CustomTextField(
label: "Cantidad",
hint: "0€",
numeric: true,
keyboardType: TextInputType.number,
),
),
Align(
@@ -49,7 +49,7 @@ class DepositBlock extends ConsumerWidget {
color: theme.getColorFor(ThemeCode.buttonPrimary),
padding: 24,
),
)
),
],
),
Align(
@@ -60,10 +60,10 @@ class DepositBlock extends ConsumerWidget {
Icon(Icons.info_outline, size: 16),
Text("Máximo que puedes añadir: $max"),
],
)
),
),
],
)
),
],
),
);