added linkPhone use cases, auth repository providers and data folder

This commit is contained in:
AlcalaJulian
2025-12-09 10:08:36 +01:00
parent 760e94ffe9
commit 0f30c7f422
34 changed files with 470 additions and 183 deletions

View File

@@ -5,6 +5,7 @@ class CountryPrefixPicker extends StatelessWidget {
const CountryPrefixPicker({
super.key,
required this.onChanged,
required this.headerText,
this.initialCountryCode = '+34',
this.radius = 12,
this.width = 90,
@@ -15,7 +16,7 @@ class CountryPrefixPicker extends StatelessWidget {
final ValueChanged<CountryCode> onChanged;
final String initialCountryCode;
final String headerText;
final double radius;
final double width;
final double height;
@@ -28,6 +29,7 @@ class CountryPrefixPicker extends StatelessWidget {
width: width,
height: height,
child: CountryCodePicker(
headerText: headerText,
onChanged: onChanged,
initialSelection: initialCountryCode,
showFlag: false,

View File

@@ -49,6 +49,7 @@ class CustomTextFieldState extends State<CustomTextField> {
),
),
TextFormField(
controller: widget.controller,
keyboardType: widget.numeric
? TextInputType.number
: TextInputType.text,

View File

@@ -0,0 +1,31 @@
Extension Discovery Cache
=========================
This folder is used by `package:extension_discovery` to cache lists of
packages that contains extensions for other packages.
DO NOT USE THIS FOLDER
----------------------
* Do not read (or rely) the contents of this folder.
* Do write to this folder.
If you're interested in the lists of extensions stored in this folder use the
API offered by package `extension_discovery` to get this information.
If this package doesn't work for your use-case, then don't try to read the
contents of this folder. It may change, and will not remain stable.
Use package `extension_discovery`
---------------------------------
If you want to access information from this folder.
Feel free to delete this folder
-------------------------------
Files in this folder act as a cache, and the cache is discarded if the files
are older than the modification time of `.dart_tool/package_config.json`.
Hence, it should never be necessary to clear this cache manually, if you find a
need to do please file a bug.

View File

@@ -0,0 +1 @@
{"version":2,"entries":[{"package":"fonts","rootUri":"../","packageUri":"lib/"}]}

View File

@@ -2,8 +2,8 @@ class AppRoutes {
static const login = '/login';
static const signup = '/signup';
static const onboarding = '/onboarding';
static const linkPhone = '/link_phone';
static const phoneCode = '/phone_code';
static const linkPhone = '/request_link_phone';
static const phoneCode = '/verify_link_phone_code';
static const deviceSignup = '/device_signup';
static const recoverPassword = '/recover_password';

View File

@@ -15,6 +15,7 @@ Future<void> configureDependencies(EnvConfig env, {bool log = false}) async {
getIt.registerLazySingleton<Dio>(
() => buildDioClient(
baseUrl: env.apiBaseUrl,
origin: env.apiOrigin,
// apiKey: env.apiKey,
log: log,
),

View File

@@ -1,4 +1,5 @@
abstract class EnvConfig {
String get apiBaseUrl;
String get apiOrigin;
// String get apiKey;
}

View File

@@ -2,6 +2,7 @@ import 'package:dio/dio.dart';
Dio buildDioClient({
required String baseUrl,
required String origin,
// required String apiKey,
bool log = false,
}) {
@@ -15,6 +16,7 @@ Dio buildDioClient({
// if (apiKey.isNotEmpty) 'x-api-key': apiKey,
'accept': 'application/json',
'content-type': 'application/json',
'origin': origin,
},
),
);

View File

@@ -12,5 +12,13 @@
"linkPhoneTitle": "Wir freuen uns sehr, dass du hier bist!",
"linkPhoneSubtitle": "Um dich sicher anzumelden, senden wir dir einen Code an deine Telefonnummer",
"mobilePhone": "Mobiltelefon",
"phoneNumber": "Telefonnummer"
"phoneNumber": "Telefonnummer",
"selectYourCountry": "Wähle dein Land",
"errorMessagePhoneIsEmpty": "Die Telefonnummer darf nicht leer sein",
"connect": "Verbinden",
"verificationCodeSentTo": "Wir haben den Code an ",
"enterCodeHere": "Gib den Code hier ein",
"enter": "Weiter",
"didNotReceiveIt": "Hast du es nicht erhalten?",
"tryAgain": "Erneut versuchen"
}

View File

@@ -12,5 +12,13 @@
"linkPhoneTitle": "We're really happy to have you here!",
"linkPhoneSubtitle": "To sign in securely, we'll send a code to your phone number",
"mobilePhone": "Mobile phone",
"phoneNumber": "Phone number"
"phoneNumber": "Phone number",
"selectYourCountry": "Select your country",
"errorMessagePhoneIsEmpty": "Phone number cannot be empty",
"connect": "Connect",
"verificationCodeSentTo": "We have sent the code to ",
"enterCodeHere": "Enter the code here",
"enter": "Enter",
"didNotReceiveIt": "Didn't receive it?",
"tryAgain": "Try again"
}

View File

@@ -12,5 +12,13 @@
"linkPhoneTitle": "¡Nos alegra mucho tenerte por aquí!",
"linkPhoneSubtitle": "Para poder entrar de forma segura, te vamos a enviar un código al teléfono",
"mobilePhone": "Teléfono móvil",
"phoneNumber": "Teléfono"
"phoneNumber": "Teléfono",
"selectYourCountry": "Selecciona tu país",
"errorMessagePhoneIsEmpty": "El número de teléfono no puede estar vacío",
"connect": "Conéctate",
"verificationCodeSentTo": "Hemos enviado el código al ",
"enterCodeHere": "Introduce el código aquí",
"enter": "enter",
"didNotReceiveIt": "¿No lo has recibido?",
"tryAgain": "Volver a intentarlo"
}

View File

@@ -12,5 +12,13 @@
"linkPhoneTitle": "Nous sommes ravis de te compter parmi nous !",
"linkPhoneSubtitle": "Pour te connecter en toute sécurité, nous allons envoyer un code sur ton téléphone",
"mobilePhone": "Téléphone portable",
"phoneNumber": "Numéro de téléphone"
"phoneNumber": "Numéro de téléphone",
"selectYourCountry": "Sélectionne ton pays",
"errorMessagePhoneIsEmpty": "Le numéro de téléphone ne peut pas être vide",
"connect": "Connecter",
"verificationCodeSentTo": "Nous avons envoyé le code à ",
"enterCodeHere": "Saisissez le code ici",
"enter": "Entrer",
"didNotReceiveIt": "Tu ne l'as pas reçu ?",
"tryAgain": "Réessayer"
}

View File

@@ -12,5 +12,13 @@
"linkPhoneTitle": "Siamo molto felici di averti qui!",
"linkPhoneSubtitle": "Per accedere in modo sicuro, ti invieremo un codice al tuo telefono",
"mobilePhone": "Telefono cellulare",
"phoneNumber": "Numero di telefono"
"phoneNumber": "Numero di telefono",
"selectYourCountry": "Seleziona il tuo paese",
"errorMessagePhoneIsEmpty": "Il numero di telefono non può essere vuoto",
"connect": "Collegare",
"verificationCodeSentTo": "Abbiamo inviato il codice a ",
"enterCodeHere": "Inserisci il codice qui",
"enter": "Entra",
"didNotReceiveIt": "Non lo hai ricevuto?",
"tryAgain": "Riprova"
}

View File

@@ -12,5 +12,13 @@
"linkPhoneTitle": "Ficamos muito felizes em ter você aqui!",
"linkPhoneSubtitle": "Para entrar com segurança, vamos enviar um código para o seu telefone",
"mobilePhone": "Telefone celular",
"phoneNumber": "Número de telefone"
"phoneNumber": "Número de telefone",
"selectYourCountry": "Selecione seu país",
"errorMessagePhoneIsEmpty": "O número de telefone não pode estar vazio",
"connect": "Conectar",
"verificationCodeSentTo": "Enviamos o código para ",
"enterCodeHere": "Insira o código aqui",
"enter": "Entrar",
"didNotReceiveIt": "Você não recebeu?",
"tryAgain": "Tentar novamente"
}

View File

@@ -17,4 +17,12 @@ class I18n {
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";
}