added safe area to forgot password
This commit is contained in:
@@ -53,82 +53,84 @@ class _MobileForgotPasswordPageState extends State<MobileForgotPasswordPage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: AppColors.backgroundColor,
|
backgroundColor: AppColors.backgroundColor,
|
||||||
body: Center(
|
body: SafeArea(
|
||||||
child: SingleChildScrollView(
|
child: Center(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 24.0.w()),
|
child: SingleChildScrollView(
|
||||||
child: Consumer<AuthViewModel>(
|
padding: EdgeInsets.symmetric(horizontal: 24.0.w()),
|
||||||
builder: (context, viewModel, _) {
|
child: Consumer<AuthViewModel>(
|
||||||
return Column(
|
builder: (context, viewModel, _) {
|
||||||
mainAxisSize: MainAxisSize.min,
|
return Column(
|
||||||
children: [
|
mainAxisSize: MainAxisSize.min,
|
||||||
Padding(
|
children: [
|
||||||
padding: EdgeInsets.symmetric(horizontal: 22.0.w()),
|
Padding(
|
||||||
child: SvgPicture.asset(
|
padding: EdgeInsets.symmetric(horizontal: 22.0.w()),
|
||||||
AssetsManager.logoBig,
|
child: SvgPicture.asset(
|
||||||
width: double.infinity,
|
AssetsManager.logoBig,
|
||||||
height: 50.0.h(),
|
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,
|
|
||||||
),
|
),
|
||||||
TextButton(
|
),
|
||||||
onPressed: () {
|
SizedBox(height: 72.0.h()),
|
||||||
Navigator.pop(context);
|
Text(
|
||||||
},
|
ForgotPasswordStrings.forgotPasswordTitle,
|
||||||
child: Text(
|
style: TextStyle(
|
||||||
ForgotPasswordStrings.backToSignInButton,
|
fontSize: 28.0.sp(),
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: AppColors.grey80,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: 16.0.h()),
|
||||||
|
Text(
|
||||||
|
ForgotPasswordStrings.forgotPasswordSubtitle,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 14.0.sp(),
|
fontSize: 14.0.sp(),
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w400,
|
||||||
color: AppColors.mainBlue,
|
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,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user