Merge pull request 'added big logo to forget all pages' (#154) from fixed_forget_design into main
Reviewed-on: https://repo.ravanertebat.com/TM/tm_app/pulls/154
This commit is contained in:
@@ -52,142 +52,164 @@ class _DesktopForgotPasswordCreatePageState
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.backgroundColor,
|
||||
body: Center(
|
||||
child: SingleChildScrollView(
|
||||
padding: EdgeInsets.symmetric(horizontal: 24.0.w()),
|
||||
child: Consumer<AuthViewModel>(
|
||||
builder: (context, viewModel, _) {
|
||||
return Center(
|
||||
child: SizedBox(
|
||||
width: 364,
|
||||
child: 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(
|
||||
ForgotPasswordCreateStrings.forgotPasswordTitle,
|
||||
style: TextStyle(
|
||||
fontSize: 28.0.sp(),
|
||||
fontWeight: FontWeight.bold,
|
||||
color: AppColors.grey80,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 16.0.h()),
|
||||
Text(
|
||||
ForgotPasswordCreateStrings.forgotPasswordSubtitle,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 14.0.sp(),
|
||||
fontWeight: FontWeight.w400,
|
||||
color: AppColors.grey60,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 40.0.h()),
|
||||
LoginTextField(
|
||||
controller: viewModel.newPasswordController,
|
||||
focusNode: viewModel.newPasswordFocus,
|
||||
label: ForgotPasswordCreateStrings.createNewPassword,
|
||||
iconPath: AssetsManager.passwordIcon,
|
||||
isPassword: true,
|
||||
obscureText: viewModel.obscureForgotPassword,
|
||||
onToggleVisibility:
|
||||
viewModel.toggleForgotPasswordVisibility,
|
||||
),
|
||||
SizedBox(height: 16.0.h()),
|
||||
Container(
|
||||
alignment: Alignment.centerLeft,
|
||||
padding: EdgeInsets.only(left: 16.0.w()),
|
||||
child: Text(
|
||||
ForgotPasswordCreateStrings.atLast5Character,
|
||||
style: TextStyle(
|
||||
fontSize: 14.0.sp(),
|
||||
color: AppColors.grey60,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 6.0.h()),
|
||||
Container(
|
||||
alignment: Alignment.centerLeft,
|
||||
padding: EdgeInsets.only(left: 16.0.w()),
|
||||
child: Text(
|
||||
ForgotPasswordCreateStrings.atLeast1uppercase,
|
||||
style: TextStyle(
|
||||
fontSize: 14.0.sp(),
|
||||
color: AppColors.grey60,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 6.0.h()),
|
||||
Container(
|
||||
alignment: Alignment.centerLeft,
|
||||
padding: EdgeInsets.only(left: 16.0.w()),
|
||||
child: Text(
|
||||
ForgotPasswordCreateStrings.atLeast1lowercase,
|
||||
style: TextStyle(
|
||||
fontSize: 14.0.sp(),
|
||||
color: AppColors.grey60,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 6.0.h()),
|
||||
Container(
|
||||
alignment: Alignment.centerLeft,
|
||||
padding: EdgeInsets.only(left: 16.0.w()),
|
||||
child: Text(
|
||||
ForgotPasswordCreateStrings.atLeastSpecial,
|
||||
style: TextStyle(
|
||||
fontSize: 14.0.sp(),
|
||||
color: AppColors.grey60,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 80.0.h()),
|
||||
viewModel.isResetPasswordLoading
|
||||
? BaseButton(
|
||||
isEnabled: viewModel.isNewPasswordValid,
|
||||
text: ForgotPasswordCreateStrings.resetLink,
|
||||
onPressed: null,
|
||||
isLoading: true,
|
||||
)
|
||||
: BaseButton(
|
||||
isEnabled: viewModel.isNewPasswordValid,
|
||||
text: ForgotPasswordCreateStrings.resetLink,
|
||||
onPressed:
|
||||
viewModel.isNewPasswordValid
|
||||
? () async {
|
||||
viewModel.resetPassword();
|
||||
}
|
||||
: null,
|
||||
),
|
||||
body: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
context.pop();
|
||||
},
|
||||
child: Text(
|
||||
ForgotPasswordCreateStrings.backToSignInButton,
|
||||
style: TextStyle(
|
||||
fontSize: 14.0.sp(),
|
||||
fontWeight: FontWeight.w500,
|
||||
color: AppColors.mainBlue,
|
||||
children: [
|
||||
Center(
|
||||
child: Consumer<AuthViewModel>(
|
||||
builder: (context, viewModel, _) {
|
||||
return Center(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 110),
|
||||
child: SizedBox(
|
||||
width: 364,
|
||||
child: 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(
|
||||
ForgotPasswordCreateStrings.forgotPasswordTitle,
|
||||
style: TextStyle(
|
||||
fontSize: 28.0.sp(),
|
||||
fontWeight: FontWeight.bold,
|
||||
color: AppColors.grey80,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 16.0.h()),
|
||||
Text(
|
||||
ForgotPasswordCreateStrings.forgotPasswordSubtitle,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 14.0.sp(),
|
||||
fontWeight: FontWeight.w400,
|
||||
color: AppColors.grey60,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 40.0.h()),
|
||||
LoginTextField(
|
||||
controller: viewModel.newPasswordController,
|
||||
focusNode: viewModel.newPasswordFocus,
|
||||
label:
|
||||
ForgotPasswordCreateStrings.createNewPassword,
|
||||
iconPath: AssetsManager.passwordIcon,
|
||||
isPassword: true,
|
||||
obscureText: viewModel.obscureForgotPassword,
|
||||
onToggleVisibility:
|
||||
viewModel.toggleForgotPasswordVisibility,
|
||||
),
|
||||
SizedBox(height: 16.0.h()),
|
||||
Container(
|
||||
alignment: Alignment.centerLeft,
|
||||
padding: EdgeInsets.only(left: 16.0.w()),
|
||||
child: Text(
|
||||
ForgotPasswordCreateStrings.atLast5Character,
|
||||
style: TextStyle(
|
||||
fontSize: 14.0.sp(),
|
||||
color: AppColors.grey60,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 6.0.h()),
|
||||
Container(
|
||||
alignment: Alignment.centerLeft,
|
||||
padding: EdgeInsets.only(left: 16.0.w()),
|
||||
child: Text(
|
||||
ForgotPasswordCreateStrings.atLeast1uppercase,
|
||||
style: TextStyle(
|
||||
fontSize: 14.0.sp(),
|
||||
color: AppColors.grey60,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 6.0.h()),
|
||||
Container(
|
||||
alignment: Alignment.centerLeft,
|
||||
padding: EdgeInsets.only(left: 16.0.w()),
|
||||
child: Text(
|
||||
ForgotPasswordCreateStrings.atLeast1lowercase,
|
||||
style: TextStyle(
|
||||
fontSize: 14.0.sp(),
|
||||
color: AppColors.grey60,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 6.0.h()),
|
||||
Container(
|
||||
alignment: Alignment.centerLeft,
|
||||
padding: EdgeInsets.only(left: 16.0.w()),
|
||||
child: Text(
|
||||
ForgotPasswordCreateStrings.atLeastSpecial,
|
||||
style: TextStyle(
|
||||
fontSize: 14.0.sp(),
|
||||
color: AppColors.grey60,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 80.0.h()),
|
||||
viewModel.isResetPasswordLoading
|
||||
? BaseButton(
|
||||
isEnabled: viewModel.isNewPasswordValid,
|
||||
text: ForgotPasswordCreateStrings.resetLink,
|
||||
onPressed: null,
|
||||
isLoading: true,
|
||||
)
|
||||
: BaseButton(
|
||||
isEnabled: viewModel.isNewPasswordValid,
|
||||
text: ForgotPasswordCreateStrings.resetLink,
|
||||
onPressed:
|
||||
viewModel.isNewPasswordValid
|
||||
? () async {
|
||||
viewModel.resetPassword();
|
||||
}
|
||||
: null,
|
||||
),
|
||||
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
context.pop();
|
||||
},
|
||||
child: Text(
|
||||
ForgotPasswordCreateStrings.backToSignInButton,
|
||||
style: TextStyle(
|
||||
fontSize: 14.0.sp(),
|
||||
fontWeight: FontWeight.w500,
|
||||
color: AppColors.mainBlue,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: 20.0.h(),
|
||||
horizontal: 25.0.w(),
|
||||
),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(32.0),
|
||||
child: Image.asset(
|
||||
AssetsManager.forgotPasswordImage,
|
||||
width: 796.0,
|
||||
height: 944.0,
|
||||
fit: BoxFit.fitWidth,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -56,102 +56,120 @@ class _DesktopForgotPasswordOtpPageState
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.backgroundColor,
|
||||
body: Center(
|
||||
child: SingleChildScrollView(
|
||||
padding: EdgeInsets.symmetric(horizontal: 24.0.w()),
|
||||
child: Consumer<AuthViewModel>(
|
||||
builder: (context, viewModel, _) {
|
||||
return Center(
|
||||
child: SizedBox(
|
||||
width: 364,
|
||||
child: 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(),
|
||||
body: Consumer<AuthViewModel>(
|
||||
builder: (context, viewModel, _) {
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 100),
|
||||
child: Center(
|
||||
child: SizedBox(
|
||||
width: 364,
|
||||
child: 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(
|
||||
ForgotPasswordOtpStrings.forgotPasswordTitle,
|
||||
style: TextStyle(
|
||||
fontSize: 28.0.sp(),
|
||||
fontWeight: FontWeight.bold,
|
||||
color: AppColors.grey80,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 16.0.h()),
|
||||
Text(
|
||||
ForgotPasswordOtpStrings.forgotPasswordSubtitle,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 14.0.sp(),
|
||||
fontWeight: FontWeight.w400,
|
||||
color: AppColors.grey60,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 40.0.h()),
|
||||
Pinput(
|
||||
controller: viewModel.otpController,
|
||||
length: 6,
|
||||
pinAnimationType: PinAnimationType.scale,
|
||||
defaultPinTheme: PinTheme(
|
||||
width: 50.0.w(),
|
||||
height: 50.0.h(),
|
||||
textStyle: TextStyle(
|
||||
fontSize: 20.0.sp(),
|
||||
SizedBox(height: 72.0.h()),
|
||||
Text(
|
||||
ForgotPasswordOtpStrings.forgotPasswordTitle,
|
||||
style: TextStyle(
|
||||
fontSize: 28.0.sp(),
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColors.grey0,
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
border: Border.all(color: AppColors.grey40),
|
||||
color: AppColors.grey80,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 24.0.h()),
|
||||
viewModel.isLoadingOtp
|
||||
? BaseButton(
|
||||
isEnabled: viewModel.isOtpValid,
|
||||
text: ForgotPasswordOtpStrings.resetLink,
|
||||
onPressed: null,
|
||||
isLoading: true,
|
||||
)
|
||||
: BaseButton(
|
||||
isEnabled: viewModel.canSubmitOtpPage,
|
||||
text: ForgotPasswordOtpStrings.resetLink,
|
||||
onPressed:
|
||||
viewModel.canSubmitOtpPage
|
||||
? () async {
|
||||
await viewModel.verifyOtp(context);
|
||||
}
|
||||
: null,
|
||||
),
|
||||
const SizedBox(height: 12.0),
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
context.pop();
|
||||
},
|
||||
child: Text(
|
||||
ForgotPasswordOtpStrings.backToSignInButton,
|
||||
SizedBox(height: 16.0.h()),
|
||||
Text(
|
||||
ForgotPasswordOtpStrings.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()),
|
||||
Pinput(
|
||||
controller: viewModel.otpController,
|
||||
length: 6,
|
||||
pinAnimationType: PinAnimationType.scale,
|
||||
defaultPinTheme: PinTheme(
|
||||
width: 50.0.w(),
|
||||
height: 50.0.h(),
|
||||
textStyle: TextStyle(
|
||||
fontSize: 20.0.sp(),
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColors.grey0,
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
border: Border.all(color: AppColors.grey40),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 24.0.h()),
|
||||
viewModel.isLoadingOtp
|
||||
? BaseButton(
|
||||
isEnabled: viewModel.isOtpValid,
|
||||
text: ForgotPasswordOtpStrings.resetLink,
|
||||
onPressed: null,
|
||||
isLoading: true,
|
||||
)
|
||||
: BaseButton(
|
||||
isEnabled: viewModel.canSubmitOtpPage,
|
||||
text: ForgotPasswordOtpStrings.resetLink,
|
||||
onPressed:
|
||||
viewModel.canSubmitOtpPage
|
||||
? () async {
|
||||
await viewModel.verifyOtp(context);
|
||||
}
|
||||
: null,
|
||||
),
|
||||
const SizedBox(height: 12.0),
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
context.pop();
|
||||
},
|
||||
child: Text(
|
||||
ForgotPasswordOtpStrings.backToSignInButton,
|
||||
style: TextStyle(
|
||||
fontSize: 14.0.sp(),
|
||||
fontWeight: FontWeight.w500,
|
||||
color: AppColors.mainBlue,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: 20.0.h(),
|
||||
horizontal: 25.0.w(),
|
||||
),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(32.0),
|
||||
child: Image.asset(
|
||||
AssetsManager.forgotPasswordImage,
|
||||
width: 796.0,
|
||||
height: 944.0,
|
||||
fit: BoxFit.fitWidth,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -60,10 +60,10 @@ class _DesktopForgotPasswordPageState extends State<DesktopForgotPasswordPage> {
|
||||
child: Consumer<AuthViewModel>(
|
||||
builder: (context, viewModel, _) {
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 120),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 110),
|
||||
child: SizedBox(
|
||||
width: 364,
|
||||
child: Column(
|
||||
@@ -140,7 +140,10 @@ class _DesktopForgotPasswordPageState extends State<DesktopForgotPasswordPage> {
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 20.0.h()),
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: 20.0.h(),
|
||||
horizontal: 25.0.w(),
|
||||
),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(32.0),
|
||||
child: Image.asset(
|
||||
|
||||
Reference in New Issue
Block a user