Compare commits

...

1 Commits

Author SHA1 Message Date
4be6a30a33 applied size utils to auth module 2026-01-08 16:24:02 +01:00
15 changed files with 113 additions and 81 deletions

View File

@@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:navigation/navigation.dart'; import 'package:navigation/navigation.dart';
import 'package:sf_localizations/sf_localizations.dart'; import 'package:sf_localizations/sf_localizations.dart';
import 'package:utils/utils.dart';
class RequestLinkPhoneScreen extends ConsumerWidget { class RequestLinkPhoneScreen extends ConsumerWidget {
final NavigationContract navigationContract; final NavigationContract navigationContract;
@@ -27,19 +28,22 @@ class RequestLinkPhoneScreen extends ConsumerWidget {
Text( Text(
context.translate(I18n.linkPhoneTitle), context.translate(I18n.linkPhoneTitle),
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: const TextStyle( style: TextStyle(
fontSize: 30, fontSize: SizeUtils.getByScreen(small: 30, big: 28, xl: 26),
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
letterSpacing: 0, letterSpacing: 0,
), ),
), ),
const SizedBox(height: 24), SizedBox(height: SizeUtils.getByScreen(small: 24, big: 22, xl: 20)),
Text( Text(
context.translate(I18n.linkPhoneSubtitle), context.translate(I18n.linkPhoneSubtitle),
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: const TextStyle(fontSize: 16, letterSpacing: 0), style: TextStyle(
fontSize: SizeUtils.getByScreen(small: 16, big: 16, xl: 14),
letterSpacing: 0
),
), ),
const SizedBox(height: 48), SizedBox(height: SizeUtils.getByScreen(small: 48, big: 46, xl: 44)),
Column( Column(
spacing: 8, spacing: 8,
@@ -89,7 +93,7 @@ class RequestLinkPhoneScreen extends ConsumerWidget {
), ),
], ],
const SizedBox(height: 24), SizedBox(height: SizeUtils.getByScreen(small: 10, big: 10)),
PrimaryButton( PrimaryButton(
onPressed: () async { onPressed: () async {

View File

@@ -5,6 +5,7 @@ import 'package:flutter/material.dart';
import 'package:navigation/navigation.dart'; import 'package:navigation/navigation.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:sf_localizations/sf_localizations.dart'; import 'package:sf_localizations/sf_localizations.dart';
import 'package:utils/utils.dart';
class VerifyLinkPhoneCodeScreen extends ConsumerWidget { class VerifyLinkPhoneCodeScreen extends ConsumerWidget {
final NavigationContract navigationContract; final NavigationContract navigationContract;
@@ -34,30 +35,32 @@ class VerifyLinkPhoneCodeScreen extends ConsumerWidget {
children: [ children: [
Text( Text(
context.translate(I18n.connect), context.translate(I18n.connect),
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 30), style: TextStyle(fontWeight: FontWeight.bold, fontSize: SizeUtils.getByScreen(small: 30, big: 28)),
), ),
const SizedBox(height: 24), const SizedBox(height: 24),
Text.rich( Text.rich(
TextSpan( TextSpan(
text: context.translate(I18n.verificationCodeSentTo), text: context.translate(I18n.verificationCodeSentTo),
style: TextStyle(
fontSize: SizeUtils.getByScreen(small: 18, big: 15),
),
children: [ children: [
TextSpan( TextSpan(
text: '${viewState.dialCode}${viewState.phoneNumber}', text: '${viewState.dialCode}${viewState.phoneNumber}',
style: const TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 18,
), ),
), ),
], ],
), ),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
const SizedBox(height: 48), SizedBox(height: SizeUtils.getByScreen(small: 48, big: 42, xl: 36)),
Text( Text(
context.translate(I18n.enterCodeHere), context.translate(I18n.enterCodeHere),
style: TextStyle(fontSize: 16), style: TextStyle(fontSize: 16),
), ),
const SizedBox(height: 24), SizedBox(height: SizeUtils.getByScreen(small: 24, big: 24, xl: 20)),
LinkPhoneCodeInput( LinkPhoneCodeInput(
length: 6, length: 6,
@@ -90,21 +93,22 @@ class VerifyLinkPhoneCodeScreen extends ConsumerWidget {
}, },
text: context.translate(I18n.enter), text: context.translate(I18n.enter),
color: theme.getColorFor(ThemeCode.buttonPrimary), color: theme.getColorFor(ThemeCode.buttonPrimary),
size: SizeUtils.getByScreen(small: 18, big: 17, xl: 16),
), ),
const SizedBox(height: 24), const SizedBox(height: 24),
Text( Text(
context.translate(I18n.didNotReceiveIt), context.translate(I18n.didNotReceiveIt),
style: TextStyle( style: TextStyle(
fontSize: 18, fontSize: SizeUtils.getByScreen(small: 18, big: 17, xl: 16),
letterSpacing: 0, letterSpacing: 0,
height: 1.5, height: SizeUtils.getByScreen(small: 1.5, big: 0),
), ),
), ),
const SizedBox(height: 8), SizedBox(height: SizeUtils.getByScreen(small: 8, big: 0)),
CustomTextButton( CustomTextButton(
onPressed: () => navigationContract.goBack(), onPressed: () => navigationContract.goBack(),
text: context.translate(I18n.tryAgain), text: context.translate(I18n.tryAgain),
size: 18, size: SizeUtils.getByScreen(small: 18, big: 17, xl: 16),
weight: FontWeight.w500, weight: FontWeight.w500,
), ),
], ],
@@ -115,4 +119,4 @@ class VerifyLinkPhoneCodeScreen extends ConsumerWidget {
), ),
); );
} }
} }

View File

@@ -1,5 +1,6 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:utils/utils.dart';
class LinkPhoneCodeInput extends StatefulWidget { class LinkPhoneCodeInput extends StatefulWidget {
const LinkPhoneCodeInput({ const LinkPhoneCodeInput({
@@ -74,8 +75,9 @@ class _LinkPhoneCodeInputState extends State<LinkPhoneCodeInput> {
decoration: const InputDecoration( decoration: const InputDecoration(
hintText: '0', hintText: '0',
counterText: '', counterText: '',
border: OutlineInputBorder(), border: OutlineInputBorder(borderRadius: BorderRadius.all(Radius.circular(14))),
), ),
style: TextStyle(fontSize: SizeUtils.getByScreen(small: 20, big: 22, xl: 17)),
maxLength: 1, maxLength: 1,
onChanged: (value) => _onDigitChanged(i, value), onChanged: (value) => _onDigitChanged(i, value),
), ),
@@ -83,4 +85,4 @@ class _LinkPhoneCodeInputState extends State<LinkPhoneCodeInput> {
}), }),
); );
} }
} }

View File

@@ -6,6 +6,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:navigation/navigation.dart'; import 'package:navigation/navigation.dart';
import 'package:sf_localizations/sf_localizations.dart'; import 'package:sf_localizations/sf_localizations.dart';
import 'package:utils/utils.dart';
class LoginScreen extends ConsumerWidget { class LoginScreen extends ConsumerWidget {
final NavigationContract navigationContract; final NavigationContract navigationContract;
@@ -98,27 +99,28 @@ class LoginScreen extends ConsumerWidget {
child: AbsorbPointer( child: AbsorbPointer(
absorbing: isLoading, absorbing: isLoading,
child: SingleChildScrollView( child: SingleChildScrollView(
padding: EdgeInsets.symmetric(horizontal: 24), padding: EdgeInsets.symmetric(horizontal: SizeUtils.getByScreen(small: 24, big: 24)),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch, crossAxisAlignment: CrossAxisAlignment.stretch,
mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
SizedBox(height: SizeUtils.getByScreen(small: 0, big: 30, xl: 44)),
_Header(theme: theme), _Header(theme: theme),
SizedBox(height: 48), SizedBox(height: SizeUtils.getByScreen(small: 26, big: 30, xl: 40)),
const _EmailSection(), const _EmailSection(),
SizedBox(height: 24), SizedBox(height: SizeUtils.getByScreen(small: 18, big: 24, xl: 20)),
_PasswordSection(onSubmitted: () => _onLogIn(context, ref)), _PasswordSection(onSubmitted: () => _onLogIn(context, ref)),
SizedBox(height: 16),
_ForgotPassword(navigationContract: navigationContract), _ForgotPassword(navigationContract: navigationContract),
SizedBox(height: 30), SizedBox(height: SizeUtils.getByScreen(small: 0, big: 24, xl: 22)),
_SignInSection( _SignInSection(
theme: theme, theme: theme,
onSignIn: () => _onLogIn(context, ref), onSignIn: () => _onLogIn(context, ref),
), ),
SizedBox(height: 30), SizedBox(height: SizeUtils.getByScreen(small: 30, big: 60, xl: 56)),
_OrContinueWith(theme: theme), _OrContinueWith(theme: theme),
SizedBox(height: 24), SizedBox(height: SizeUtils.getByScreen(small: 24, big: 24, xl: 26)),
_SocialButtons(theme: theme), _SocialButtons(theme: theme),
SizedBox(height: 30), SizedBox(height: SizeUtils.getByScreen(small: 18, big: 36)),
_Footer(navigationContract: navigationContract), _Footer(navigationContract: navigationContract),
], ],
), ),
@@ -140,12 +142,15 @@ class _Header extends StatelessWidget {
Icon( Icon(
Icons.check, Icons.check,
color: theme.getColorFor(ThemeCode.buttonPrimary), color: theme.getColorFor(ThemeCode.buttonPrimary),
size: 54, size: SizeUtils.getByScreen(small: 54, big: 50, xl: 46),
), ),
Text( Text(
context.translate(I18n.welcome), context.translate(I18n.welcome),
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: const TextStyle(fontSize: 30, fontWeight: FontWeight.bold), style: TextStyle(
fontSize: SizeUtils.getByScreen(small: 30, big: 28, xl: 27),
fontWeight: FontWeight.w500
),
), ),
], ],
); );
@@ -168,6 +173,7 @@ class _EmailSection extends ConsumerWidget {
CustomTextField( CustomTextField(
hint: context.translate(I18n.username), hint: context.translate(I18n.username),
label: context.translate(I18n.username), label: context.translate(I18n.username),
labelSize: SizeUtils.getByScreen(small: 14, big: 14, xl: 12),
controller: vm.emailController, controller: vm.emailController,
keyboardType: TextInputType.emailAddress, keyboardType: TextInputType.emailAddress,
textInputAction: TextInputAction.next, textInputAction: TextInputAction.next,
@@ -199,6 +205,7 @@ class _PasswordSection extends ConsumerWidget {
CustomTextField( CustomTextField(
showPassword: passwordVisible, showPassword: passwordVisible,
label: context.translate(I18n.password), label: context.translate(I18n.password),
labelSize: SizeUtils.getByScreen(small: 14, big: 14, xl: 12),
hint: '********', hint: '********',
controller: vm.passwordController, controller: vm.passwordController,
textInputAction: TextInputAction.done, textInputAction: TextInputAction.done,
@@ -227,7 +234,7 @@ class _ForgotPassword extends ConsumerWidget {
onPressed: isLoading onPressed: isLoading
? () {} ? () {}
: () => navigationContract.pushTo(AppRoutes.recoverPassword), : () => navigationContract.pushTo(AppRoutes.recoverPassword),
size: 16, size: SizeUtils.getByScreen(small: 16, big: 15, xl: 14),
), ),
); );
} }
@@ -265,6 +272,7 @@ class _SignInSection extends ConsumerWidget {
), ),
) )
: null, : null,
size: SizeUtils.getByScreen(small: 18, big: 17, xl: 16),
), ),
if (errorMessage.isNotEmpty) if (errorMessage.isNotEmpty)
Padding( Padding(
@@ -274,7 +282,7 @@ class _SignInSection extends ConsumerWidget {
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: Theme.of(context).colorScheme.error, color: Theme.of(context).colorScheme.error,
fontSize: 13, fontSize: SizeUtils.getByScreen(small: 13, big: 12, xl: 11),
), ),
), ),
), ),
@@ -328,7 +336,7 @@ class _SocialButtons extends ConsumerWidget {
), ),
), ),
radius: 16, radius: 16,
padding: 44, padding: SizeUtils.getByScreen(small: 44, big: 40, xl: 36),
text: context.translate(I18n.google), text: context.translate(I18n.google),
label: 'Google', label: 'Google',
), ),
@@ -336,7 +344,7 @@ class _SocialButtons extends ConsumerWidget {
SecondaryButton( SecondaryButton(
onPressed: isLoading ? () {} : () {}, onPressed: isLoading ? () {} : () {},
radius: 16, radius: 16,
padding: 44, padding: SizeUtils.getByScreen(small: 44, big: 40, xl: 36),
icon: Icons.apple, icon: Icons.apple,
label: 'Apple', label: 'Apple',
), ),
@@ -359,20 +367,15 @@ class _Footer extends ConsumerWidget {
children: [ children: [
Text( Text(
context.translate(I18n.dontHaveAccount), context.translate(I18n.dontHaveAccount),
style: const TextStyle(fontSize: 18, letterSpacing: 0), style: TextStyle(fontSize: SizeUtils.getByScreen(small: 18, big: 17, xl: 16), letterSpacing: 0, height: 0),
), ),
TextButton( CustomTextButton(
onPressed: isLoading onPressed: isLoading
? null ? null
: () => navigationContract.pushTo(AppRoutes.signup), : () => navigationContract.pushTo(AppRoutes.signup),
child: Text( text: context.translate(I18n.createOneNow),
context.translate(I18n.createOneNow), size: SizeUtils.getByScreen(small: 18, big: 17, xl: 16),
style: const TextStyle( weight: FontWeight.w500,
fontSize: 18,
fontWeight: FontWeight.w500,
letterSpacing: 0,
),
),
), ),
], ],
); );

View File

@@ -3,6 +3,7 @@ import 'dart:async';
import 'package:auth/src/features/login/presentation/widgets/otp_code_fields.dart'; import 'package:auth/src/features/login/presentation/widgets/otp_code_fields.dart';
import 'package:design_system/design_system.dart'; import 'package:design_system/design_system.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:utils/utils.dart';
class TwoFactorBottomSheetView extends StatelessWidget { class TwoFactorBottomSheetView extends StatelessWidget {
const TwoFactorBottomSheetView({ const TwoFactorBottomSheetView({
@@ -82,8 +83,9 @@ class TwoFactorBottomSheetView extends StatelessWidget {
if (isOtpLoading || !_isValidOtp) return; if (isOtpLoading || !_isValidOtp) return;
unawaited(onVerify()); unawaited(onVerify());
}, },
gap: SizeUtils.getByScreen(small: 10, big: 8, xl: 4),
), ),
const SizedBox(height: 20), SizedBox(height: SizeUtils.getByScreen(small: 24, big: 38)),
PrimaryButton( PrimaryButton(
onPressed: (isOtpLoading || !_isValidOtp) onPressed: (isOtpLoading || !_isValidOtp)
@@ -103,7 +105,7 @@ class TwoFactorBottomSheetView extends StatelessWidget {
: null, : null,
), ),
const SizedBox(height: 12), SizedBox(height: SizeUtils.getByScreen(small: 12, big: 9)),
TextButton( TextButton(
onPressed: isOtpLoading ? null : onClose, onPressed: isOtpLoading ? null : onClose,

View File

@@ -58,7 +58,7 @@ class NewPasswordScreen extends ConsumerWidget {
// color: viewState.equalPasswords ? const Color(0xFF4B4B4B) : const Color.fromRGBO(239, 17, 17, 1), // color: viewState.equalPasswords ? const Color(0xFF4B4B4B) : const Color.fromRGBO(239, 17, 17, 1),
), ),
if (!viewState.equalPasswords) ...[ if (!viewState.equalPasswords) ...[
SizedBox(height: 4), SizedBox(height: SizeUtils.getByScreen(small: 8, big: 8)),
Row( Row(
spacing: 8, spacing: 8,
children: [ children: [
@@ -79,7 +79,7 @@ class NewPasswordScreen extends ConsumerWidget {
], ],
), ),
], ],
SizedBox(height: 12), SizedBox(height: SizeUtils.getByScreen(small: 14, big: 12)),
Row( Row(
spacing: 8, spacing: 8,
children: [ children: [
@@ -176,7 +176,7 @@ class NewPasswordScreen extends ConsumerWidget {
], ],
), ),
SizedBox( SizedBox(
height: SizeUtils.getByScreen(small: 32, big: 32, xl: 24), height: SizeUtils.getByScreen(small: 28, big: 32, xl: 24),
), ),
Align( Align(
alignment: Alignment.bottomLeft, alignment: Alignment.bottomLeft,

View File

@@ -23,14 +23,14 @@ class RequestRecoveryScreen extends ConsumerWidget {
return Scaffold( return Scaffold(
backgroundColor: theme.getColorFor(ThemeCode.backgroundPrimary), backgroundColor: theme.getColorFor(ThemeCode.backgroundPrimary),
body: Container( body: Container(
margin: EdgeInsets.all(SizeUtils.getByScreen(small: 30, big: 30, xl: 20)), margin: EdgeInsets.symmetric(horizontal: SizeUtils.getByScreen(small: 30, big: 30, xl: 20)),
child: Center( child: Center(
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Text( Text(
context.translate(I18n.recoverPasswordTitle), context.translate(I18n.recoverPasswordTitle),
style: TextStyle(fontWeight: FontWeight.bold, fontSize: SizeUtils.getByScreen(small: 29, big: 29, xl: 26)), style: TextStyle(fontWeight: FontWeight.w500, fontSize: SizeUtils.getByScreen(small: 29, big: 27, xl: 26)),
), ),
SizedBox(height: SizeUtils.getByScreen(small: 24, big: 32)), SizedBox(height: SizeUtils.getByScreen(small: 24, big: 32)),
Text( Text(
@@ -38,13 +38,13 @@ class RequestRecoveryScreen extends ConsumerWidget {
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle(letterSpacing: 0, fontSize: SizeUtils.getByScreen(small: 18, big: 18, xl: 16)), style: TextStyle(letterSpacing: 0, fontSize: SizeUtils.getByScreen(small: 18, big: 18, xl: 16)),
), ),
SizedBox(height: SizeUtils.getByScreen(small: 56, big: 48)), SizedBox(height: SizeUtils.getByScreen(small: 56, big: 52)),
CustomTextField( CustomTextField(
label: context.translate(I18n.email), label: context.translate(I18n.email),
hint: context.translate(I18n.email), hint: context.translate(I18n.email),
controller: viewModel.emailController, controller: viewModel.emailController,
), ),
SizedBox(height: SizeUtils.getByScreen(small: 40, big: 40, xl: 28)), SizedBox(height: SizeUtils.getByScreen(small: 36, big: 36, xl: 26)),
Align( Align(
alignment: Alignment.bottomLeft, alignment: Alignment.bottomLeft,
child: Text( child: Text(

View File

@@ -60,9 +60,9 @@ class SentScreen extends ConsumerWidget {
? context.translate(I18n.checkEmail1) ? context.translate(I18n.checkEmail1)
: context.translate(I18n.checkSms1), : context.translate(I18n.checkSms1),
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle(fontSize: SizeUtils.getByScreen(small: 17, big: 17, xl: 15), letterSpacing: 0), style: TextStyle(fontSize: SizeUtils.getByScreen(small: 17, big: 17, xl: 14), letterSpacing: 0),
), ),
SizedBox(height: 16), SizedBox(height: SizeUtils.getByScreen(small: 16, big: 16, xl: 14)),
Text( Text(
viewState.recoveryFormat == "email" viewState.recoveryFormat == "email"
? context.translate(I18n.checkEmail2) ? context.translate(I18n.checkEmail2)
@@ -70,7 +70,7 @@ class SentScreen extends ConsumerWidget {
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle(fontSize: SizeUtils.getByScreen(small: 14, big: 14, xl: 12), letterSpacing: 0), style: TextStyle(fontSize: SizeUtils.getByScreen(small: 14, big: 14, xl: 12), letterSpacing: 0),
), ),
SizedBox(height: SizeUtils.getByScreen(small: 48, big: 48, xl: 40)), SizedBox(height: SizeUtils.getByScreen(small: 48, big: 48, xl: 38)),
Row( Row(
children: [ children: [
Expanded( Expanded(

View File

@@ -2,6 +2,7 @@ import 'package:country_code_picker/country_code_picker.dart';
import 'package:design_system/design_system.dart'; import 'package:design_system/design_system.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:sf_localizations/sf_localizations.dart'; import 'package:sf_localizations/sf_localizations.dart';
import 'package:utils/utils.dart';
class SignupAddressScreen extends StatelessWidget { class SignupAddressScreen extends StatelessWidget {
const SignupAddressScreen({ const SignupAddressScreen({
@@ -145,7 +146,9 @@ class SignupAddressScreen extends StatelessWidget {
const SizedBox(height: 8), const SizedBox(height: 8),
Align( Align(
alignment: Alignment.bottomLeft, alignment: Alignment.bottomLeft,
child: Text(birthCountryLabel, style: const TextStyle(fontSize: 14)), child: Text(birthCountryLabel, style: TextStyle(
fontSize: SizeUtils.getByScreen(small: 14, big: 13, xl: 12),
)),
), ),
const SizedBox(height: 8), const SizedBox(height: 8),
Row( Row(
@@ -168,6 +171,7 @@ class SignupAddressScreen extends StatelessWidget {
CustomTextField( CustomTextField(
label: streetLabel, label: streetLabel,
labelSize: SizeUtils.getByScreen(small: 14, big: 13, xl: 12),
hint: streetHint, hint: streetHint,
controller: streetController, controller: streetController,
), ),
@@ -175,6 +179,7 @@ class SignupAddressScreen extends StatelessWidget {
CustomTextField( CustomTextField(
label: cityLabel, label: cityLabel,
labelSize: SizeUtils.getByScreen(small: 14, big: 13, xl: 12),
hint: cityHint, hint: cityHint,
controller: cityController, controller: cityController,
), ),
@@ -182,6 +187,7 @@ class SignupAddressScreen extends StatelessWidget {
CustomTextField( CustomTextField(
label: provinceLabel, label: provinceLabel,
labelSize: SizeUtils.getByScreen(small: 14, big: 13, xl: 12),
hint: provinceHint, hint: provinceHint,
controller: provinceController, controller: provinceController,
), ),
@@ -189,6 +195,7 @@ class SignupAddressScreen extends StatelessWidget {
CustomTextField( CustomTextField(
label: stateLabel, label: stateLabel,
labelSize: SizeUtils.getByScreen(small: 14, big: 13, xl: 12),
hint: stateHint, hint: stateHint,
controller: stateController, controller: stateController,
), ),
@@ -222,6 +229,7 @@ class SignupAddressScreen extends StatelessWidget {
CustomTextField( CustomTextField(
label: postCodeLabel, label: postCodeLabel,
labelSize: SizeUtils.getByScreen(small: 14, big: 13, xl: 12),
hint: postCodeHint, hint: postCodeHint,
keyboardType: TextInputType.number, keyboardType: TextInputType.number,
controller: postCodeController, controller: postCodeController,
@@ -229,4 +237,4 @@ class SignupAddressScreen extends StatelessWidget {
], ],
); );
} }
} }

View File

@@ -2,6 +2,7 @@ import 'package:country_code_picker/country_code_picker.dart';
import 'package:design_system/design_system.dart'; import 'package:design_system/design_system.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:sf_localizations/sf_localizations.dart'; import 'package:sf_localizations/sf_localizations.dart';
import 'package:utils/utils.dart';
class SignupPersonalScreen extends StatelessWidget { class SignupPersonalScreen extends StatelessWidget {
final TextEditingController firstNameTextFieldController; final TextEditingController firstNameTextFieldController;
@@ -72,12 +73,14 @@ class SignupPersonalScreen extends StatelessWidget {
children: [ children: [
CustomTextField( CustomTextField(
label: firstNameLabel, label: firstNameLabel,
labelSize: SizeUtils.getByScreen(small: 14, big: 13, xl: 12),
hint: firstNameHint, hint: firstNameHint,
controller: firstNameTextFieldController, controller: firstNameTextFieldController,
), ),
const SizedBox(height: 8), const SizedBox(height: 8),
CustomTextField( CustomTextField(
label: lastNameLabel, label: lastNameLabel,
labelSize: SizeUtils.getByScreen(small: 14, big: 13, xl: 12),
hint: lastNameHint, hint: lastNameHint,
controller: lastNameTextFieldController, controller: lastNameTextFieldController,
), ),
@@ -99,6 +102,7 @@ class SignupPersonalScreen extends StatelessWidget {
Expanded( Expanded(
child: CustomTextField( child: CustomTextField(
label: documentNumberLabel, label: documentNumberLabel,
labelSize: SizeUtils.getByScreen(small: 14, big: 13, xl: 12),
hint: documentNumberHint, hint: documentNumberHint,
controller: documentNumberTextFieldController, controller: documentNumberTextFieldController,
), ),
@@ -108,7 +112,9 @@ class SignupPersonalScreen extends StatelessWidget {
const SizedBox(height: 8), const SizedBox(height: 8),
Align( Align(
alignment: Alignment.bottomLeft, alignment: Alignment.bottomLeft,
child: Text(phoneLabel, style: const TextStyle(fontSize: 14)), child: Text(phoneLabel, style: TextStyle(
fontSize: SizeUtils.getByScreen(small: 14, big: 13, xl: 12)
)),
), ),
const SizedBox(height: 8), const SizedBox(height: 8),
Row( Row(
@@ -130,11 +136,12 @@ class SignupPersonalScreen extends StatelessWidget {
const SizedBox(height: 8), const SizedBox(height: 8),
CustomTextField( CustomTextField(
label: emailLabel, label: emailLabel,
labelSize: SizeUtils.getByScreen(small: 14, big: 13, xl: 12),
hint: emailHint, hint: emailHint,
keyboardType: TextInputType.emailAddress, keyboardType: TextInputType.emailAddress,
controller: emailTextFieldController, controller: emailTextFieldController,
), ),
const SizedBox(height: 8),
CheckboxListTile( CheckboxListTile(
value: acceptTerms, value: acceptTerms,
onChanged: onAcceptTermsPressed, onChanged: onAcceptTermsPressed,

View File

@@ -1,6 +1,7 @@
import 'package:design_system/design_system.dart'; import 'package:design_system/design_system.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:utils/utils.dart';
class FormStepLayout extends ConsumerWidget { class FormStepLayout extends ConsumerWidget {
final int currentStep; final int currentStep;
@@ -70,7 +71,7 @@ class FormStepLayout extends ConsumerWidget {
Text( Text(
subtitle!, subtitle!,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle(fontSize: 18), style: TextStyle(fontSize: SizeUtils.getByScreen(small: 18, big: 17)),
), ),
], ],
), ),

View File

@@ -1,6 +1,7 @@
import 'package:auth/src/widgets/form_error_banner.dart'; import 'package:auth/src/widgets/form_error_banner.dart';
import 'package:design_system/design_system.dart'; import 'package:design_system/design_system.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:utils/utils.dart';
class SignUpLayout extends StatelessWidget { class SignUpLayout extends StatelessWidget {
final ThemePort theme; final ThemePort theme;
@@ -53,24 +54,24 @@ class SignUpLayout extends StatelessWidget {
Text( Text(
supertitle, supertitle,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: const TextStyle(fontSize: 18), style: TextStyle(fontSize: SizeUtils.getByScreen(small: 18, big: 16, xl: 15)),
), ),
const SizedBox(height: 10), SizedBox(height: SizeUtils.getByScreen(small: 8, big: 5)),
Text( Text(
title, title,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: const TextStyle( style: TextStyle(
fontSize: 30, fontSize: SizeUtils.getByScreen(small: 30, big: 28, xl: 26),
fontWeight: FontWeight.bold, fontWeight: FontWeight.w500,
), ),
), ),
const SizedBox(height: 16), const SizedBox(height: 16),
Text( Text(
subtitle, subtitle,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: const TextStyle(fontSize: 18), style: TextStyle(fontSize: SizeUtils.getByScreen(small: 18, big: 17, xl: 15)),
), ),
const SizedBox(height: 16), SizedBox(height: SizeUtils.getByScreen(small: 16, big: 20, xl: 36)),
Expanded( Expanded(
child: SingleChildScrollView( child: SingleChildScrollView(

View File

@@ -1,7 +1,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class CustomTextButton extends StatelessWidget { class CustomTextButton extends StatelessWidget {
final VoidCallback onPressed; final VoidCallback? onPressed;
final String text; final String text;
final double size; final double size;
final FontWeight weight; final FontWeight weight;

View File

@@ -76,18 +76,18 @@ class CustomTextFieldState extends State<CustomTextField> {
gapPadding: 16, gapPadding: 16,
), ),
suffixIcon: widget.showPassword != null suffixIcon: widget.showPassword != null
? IconButton( ? IconButton(
icon: Icon( icon: Icon(
_showPassword ? Icons.visibility_off : Icons.visibility, _showPassword ? Icons.visibility_off_outlined : Icons.visibility_outlined,
), ),
onPressed: () { onPressed: () {
setState(() { setState(() {
_showPassword = !_showPassword; _showPassword = !_showPassword;
}); });
}, },
//onpressed: widget.onVisibilityChanged, //onpressed: widget.onVisibilityChanged,
) )
: null, : null,
), ),
minLines: widget.lines ?? 1, minLines: widget.lines ?? 1,
maxLines: widget.lines ?? 1, maxLines: widget.lines ?? 1,

View File

@@ -10,7 +10,7 @@
"next": "Siguiente", "next": "Siguiente",
"skip": "Omitir", "skip": "Omitir",
"linkPhoneTitle": "¡Nos alegra mucho tenerte por aquí!", "linkPhoneTitle": "¡Nos alegra mucho tenerte por aquí!",
"linkPhoneSubtitle": "Para poder entrar de forma segura, te vamos a enviar un código al teléfono", "linkPhoneSubtitle": "Para poder entrar de forma segura,\nte vamos a enviar un código al teléfono",
"mobilePhone": "Teléfono móvil", "mobilePhone": "Teléfono móvil",
"phoneNumber": "Teléfono", "phoneNumber": "Teléfono",
"selectYourCountry": "Selecciona tu país", "selectYourCountry": "Selecciona tu país",
@@ -18,7 +18,7 @@
"connect": "Conéctate", "connect": "Conéctate",
"verificationCodeSentTo": "Hemos enviado el código al ", "verificationCodeSentTo": "Hemos enviado el código al ",
"enterCodeHere": "Introduce el código aquí", "enterCodeHere": "Introduce el código aquí",
"enter": "entrar", "enter": "Entrar",
"didNotReceiveIt": "¿No lo has recibido?", "didNotReceiveIt": "¿No lo has recibido?",
"tryAgain": "Volver a intentarlo", "tryAgain": "Volver a intentarlo",
"welcome": "¡Te damos la bienvenida!", "welcome": "¡Te damos la bienvenida!",