diff --git a/lib/views/forgot_password/pages/m_forgot_password_page.dart b/lib/views/forgot_password/pages/m_forgot_password_page.dart index b39ce22..58f41b2 100644 --- a/lib/views/forgot_password/pages/m_forgot_password_page.dart +++ b/lib/views/forgot_password/pages/m_forgot_password_page.dart @@ -53,82 +53,84 @@ class _MobileForgotPasswordPageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.backgroundColor, - body: Center( - child: SingleChildScrollView( - padding: EdgeInsets.symmetric(horizontal: 24.0.w()), - child: Consumer( - builder: (context, viewModel, _) { - return Column( - mainAxisSize: MainAxisSize.min, - children: [ - Padding( - padding: EdgeInsets.symmetric(horizontal: 22.0.w()), - child: SvgPicture.asset( - AssetsManager.logoBig, - width: double.infinity, - height: 50.0.h(), - ), - ), - SizedBox(height: 72.0.h()), - Text( - ForgotPasswordStrings.forgotPasswordTitle, - style: TextStyle( - fontSize: 28.0.sp(), - fontWeight: FontWeight.bold, - color: AppColors.grey80, - ), - ), - SizedBox(height: 16.0.h()), - Text( - ForgotPasswordStrings.forgotPasswordSubtitle, - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 14.0.sp(), - fontWeight: FontWeight.w400, - color: AppColors.grey60, - ), - ), - SizedBox(height: 40.0.h()), - LoginTextField( - controller: viewModel.emailController, - focusNode: viewModel.emailFocus, - label: ForgotPasswordStrings.emailHint, - isPassword: false, - ), - SizedBox(height: 24.0.h()), - viewModel.isLoadingForgot - ? const BaseButton( - isEnabled: false, - text: ForgotPasswordStrings.resetLink, - onPressed: null, - isLoading: true, - ) - : BaseButton( - isEnabled: viewModel.isEmailValid, - text: ForgotPasswordStrings.resetLink, - onPressed: - viewModel.isEmailValid - ? () async { - await viewModel.forgotPassword(context); - } - : null, + body: SafeArea( + child: Center( + child: SingleChildScrollView( + padding: EdgeInsets.symmetric(horizontal: 24.0.w()), + child: Consumer( + builder: (context, viewModel, _) { + return Column( + mainAxisSize: MainAxisSize.min, + children: [ + Padding( + padding: EdgeInsets.symmetric(horizontal: 22.0.w()), + child: SvgPicture.asset( + AssetsManager.logoBig, + width: double.infinity, + height: 50.0.h(), ), - TextButton( - onPressed: () { - Navigator.pop(context); - }, - child: Text( - ForgotPasswordStrings.backToSignInButton, + ), + SizedBox(height: 72.0.h()), + Text( + ForgotPasswordStrings.forgotPasswordTitle, + style: TextStyle( + fontSize: 28.0.sp(), + fontWeight: FontWeight.bold, + color: AppColors.grey80, + ), + ), + SizedBox(height: 16.0.h()), + Text( + ForgotPasswordStrings.forgotPasswordSubtitle, + textAlign: TextAlign.center, style: TextStyle( fontSize: 14.0.sp(), - fontWeight: FontWeight.w500, - color: AppColors.mainBlue, + fontWeight: FontWeight.w400, + color: AppColors.grey60, ), ), - ), - ], - ); - }, + SizedBox(height: 40.0.h()), + LoginTextField( + controller: viewModel.emailController, + focusNode: viewModel.emailFocus, + label: ForgotPasswordStrings.emailHint, + isPassword: false, + ), + SizedBox(height: 24.0.h()), + viewModel.isLoadingForgot + ? const BaseButton( + isEnabled: false, + text: ForgotPasswordStrings.resetLink, + onPressed: null, + isLoading: true, + ) + : BaseButton( + isEnabled: viewModel.isEmailValid, + text: ForgotPasswordStrings.resetLink, + onPressed: + viewModel.isEmailValid + ? () async { + await viewModel.forgotPassword(context); + } + : null, + ), + TextButton( + onPressed: () { + Navigator.pop(context); + }, + child: Text( + ForgotPasswordStrings.backToSignInButton, + style: TextStyle( + fontSize: 14.0.sp(), + fontWeight: FontWeight.w500, + color: AppColors.mainBlue, + ), + ), + ), + ], + ); + }, + ), ), ), ),