From b62f565996d180b4fcd8c3c356d537666223bff8 Mon Sep 17 00:00:00 2001 From: Amanda Shafack Date: Tue, 4 Apr 2023 17:11:30 +0100 Subject: [PATCH] chore: revise the signup with phone number screen to match the design --- lib/l10n/arb/app_en.arb | 2 +- .../view/widgets/phone_number_input.dart | 3 + lib/sign_up/view/signup_page.dart | 149 +++++++++--------- 3 files changed, 77 insertions(+), 77 deletions(-) diff --git a/lib/l10n/arb/app_en.arb b/lib/l10n/arb/app_en.arb index e00b658..0fd1241 100644 --- a/lib/l10n/arb/app_en.arb +++ b/lib/l10n/arb/app_en.arb @@ -88,7 +88,7 @@ "@signInPasswordFieldLabel": { "description": "This is the label displayed on the sign in screen for the Password field" }, - "signInPhoneNumberFieldLabel": "Phone Number", + "signInPhoneNumberFieldLabel": "Phone number", "@signInPhoneNumberFieldLabel": { "description": "This is the label displayed on the sign in screen for the Phone number field" }, diff --git a/lib/sign_in/view/widgets/phone_number_input.dart b/lib/sign_in/view/widgets/phone_number_input.dart index 49122d6..de8e1e9 100644 --- a/lib/sign_in/view/widgets/phone_number_input.dart +++ b/lib/sign_in/view/widgets/phone_number_input.dart @@ -25,6 +25,9 @@ class PhoneNumberInput extends StatelessWidget { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ + SizedBox( + height: cts.maxHeight * .045, + ), Text( l10n.signInPhoneNumberFieldLabel, style: style.titleSmall, diff --git a/lib/sign_up/view/signup_page.dart b/lib/sign_up/view/signup_page.dart index 4752382..c294dbc 100644 --- a/lib/sign_up/view/signup_page.dart +++ b/lib/sign_up/view/signup_page.dart @@ -212,95 +212,92 @@ class _SignUpBodyState extends State ], ), ), - SingleChildScrollView( - child: Column( - mainAxisAlignment: - MainAxisAlignment.center, - children: [ - SizedBox( - height: box.maxHeight * .12, - ), - PhoneNumberInput( - key: Key('IntlPhoneInput'), - l10n: l10n, - cts: box, - ), - ], - ), + + PhoneNumberInput( + key: Key('IntlPhoneInput'), + l10n: l10n, + cts: box, ), ], ), ), ), - FpbButton( - label: l10n.signInSignUpLabel, - onTap: () {}, - ), - Padding( - padding: EdgeInsets.symmetric( - vertical: box.maxHeight * 0.012, - ), - child: Row( - mainAxisAlignment: - MainAxisAlignment.spaceEvenly, + Expanded( + child: Column( + mainAxisSize: MainAxisSize.max, children: [ - Expanded( - child: Divider( - key: Key('Divider'), - color: - theme.colorScheme.outlineVariant, - )), - Padding( - padding: EdgeInsets.symmetric( - horizontal: box.maxHeight * .015, - ), - child: Text( - key: Key('OrSignUpWith'), - l10n.signUpOrSignupWithText, - ), - ), - Expanded( - child: Divider( - key: Key('Divider'), - color: - theme.colorScheme.outlineVariant, - )) - ], + FpbButton( + label: l10n.signInSignUpLabel, + onTap: () {}, ), - ), - AlternativeAuth(box: box), - Padding( - padding: EdgeInsets.only( - top: box.maxHeight * 0.001, - bottom: box.maxHeight * 0.0001, + Padding( + padding: EdgeInsets.symmetric( + vertical: box.maxHeight * 0.012, + ), + child: Row( + mainAxisAlignment: + MainAxisAlignment.spaceEvenly, + children: [ + Expanded( + child: Divider( + key: Key('Divider'), + color: + theme.colorScheme.outlineVariant, + )), + Padding( + padding: EdgeInsets.symmetric( + horizontal: box.maxHeight * .015, + ), + child: Text( + key: Key('OrSignUpWith'), + l10n.signUpOrSignupWithText, + ), + ), + Expanded( + child: Divider( + key: Key('Divider'), + color: + theme.colorScheme.outlineVariant, + )) + ], + ), ), - child: Row( - mainAxisAlignment: - MainAxisAlignment.center, - children: [ - Text( - l10n.signUpAlreadyAMemberText, - key: Key('AlreadyAMember'), - style: style.titleSmall?.copyWith( - color: theme.colorScheme.secondary, - fontWeight: FontWeight.w400, + AlternativeAuth(box: box), + Padding( + padding: EdgeInsets.only( + top: box.maxHeight * 0.001, + bottom: box.maxHeight * 0.0001, + ), + child: Row( + mainAxisAlignment: + MainAxisAlignment.center, + children: [ + Text( + l10n.signUpAlreadyAMemberText, + key: Key('AlreadyAMember'), + style: style.titleSmall?.copyWith( + color: theme.colorScheme.secondary, + fontWeight: FontWeight.w400, + ), ), - ), - TextButton( - onPressed: () { - context.router.pop(); - }, - child: Text( - l10n.signInLogInTitle, - style: style.titleMedium?.copyWith( - color: theme.colorScheme.primary, - fontWeight: FontWeight.bold, + TextButton( + onPressed: () { + context.router.pop(); + }, + child: Text( + l10n.signInLogInTitle, + style: style.titleMedium?.copyWith( + color: theme.colorScheme.primary, + fontWeight: FontWeight.bold, + ), ), ), - ), - ], + ], + ), ), + ],), ), + tabController.index == 1 ? SizedBox(height: box.maxHeight * 0.15 ,) : SizedBox(), ], ).card( height: