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) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: AppColors.backgroundColor,
|
backgroundColor: AppColors.backgroundColor,
|
||||||
body: Center(
|
body: Row(
|
||||||
child: SingleChildScrollView(
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
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,
|
|
||||||
),
|
|
||||||
|
|
||||||
TextButton(
|
children: [
|
||||||
onPressed: () {
|
Center(
|
||||||
context.pop();
|
child: Consumer<AuthViewModel>(
|
||||||
},
|
builder: (context, viewModel, _) {
|
||||||
child: Text(
|
return Center(
|
||||||
ForgotPasswordCreateStrings.backToSignInButton,
|
child: Padding(
|
||||||
style: TextStyle(
|
padding: const EdgeInsets.symmetric(horizontal: 110),
|
||||||
fontSize: 14.0.sp(),
|
child: SizedBox(
|
||||||
fontWeight: FontWeight.w500,
|
width: 364,
|
||||||
color: AppColors.mainBlue,
|
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) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: AppColors.backgroundColor,
|
backgroundColor: AppColors.backgroundColor,
|
||||||
body: Center(
|
body: Consumer<AuthViewModel>(
|
||||||
child: SingleChildScrollView(
|
builder: (context, viewModel, _) {
|
||||||
padding: EdgeInsets.symmetric(horizontal: 24.0.w()),
|
return Row(
|
||||||
child: Consumer<AuthViewModel>(
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
builder: (context, viewModel, _) {
|
children: [
|
||||||
return Center(
|
Padding(
|
||||||
child: SizedBox(
|
padding: const EdgeInsets.symmetric(horizontal: 100),
|
||||||
width: 364,
|
child: Center(
|
||||||
child: Column(
|
child: SizedBox(
|
||||||
mainAxisSize: MainAxisSize.min,
|
width: 364,
|
||||||
children: [
|
child: Column(
|
||||||
Padding(
|
mainAxisSize: MainAxisSize.min,
|
||||||
padding: EdgeInsets.symmetric(horizontal: 22.0.w()),
|
children: [
|
||||||
child: SvgPicture.asset(
|
Padding(
|
||||||
AssetsManager.logoBig,
|
padding: EdgeInsets.symmetric(horizontal: 22.0.w()),
|
||||||
width: double.infinity,
|
child: SvgPicture.asset(
|
||||||
height: 50.0.h(),
|
AssetsManager.logoBig,
|
||||||
|
width: double.infinity,
|
||||||
|
height: 50.0.h(),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
SizedBox(height: 72.0.h()),
|
||||||
SizedBox(height: 72.0.h()),
|
Text(
|
||||||
Text(
|
ForgotPasswordOtpStrings.forgotPasswordTitle,
|
||||||
ForgotPasswordOtpStrings.forgotPasswordTitle,
|
style: TextStyle(
|
||||||
style: TextStyle(
|
fontSize: 28.0.sp(),
|
||||||
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(),
|
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
color: AppColors.grey80,
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: AppColors.grey0,
|
|
||||||
borderRadius: BorderRadius.circular(10),
|
|
||||||
border: Border.all(color: AppColors.grey40),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
SizedBox(height: 16.0.h()),
|
||||||
SizedBox(height: 24.0.h()),
|
Text(
|
||||||
viewModel.isLoadingOtp
|
ForgotPasswordOtpStrings.forgotPasswordSubtitle,
|
||||||
? BaseButton(
|
textAlign: TextAlign.center,
|
||||||
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(
|
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()),
|
||||||
],
|
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>(
|
child: Consumer<AuthViewModel>(
|
||||||
builder: (context, viewModel, _) {
|
builder: (context, viewModel, _) {
|
||||||
return Row(
|
return Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 120),
|
padding: const EdgeInsets.symmetric(horizontal: 110),
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: 364,
|
width: 364,
|
||||||
child: Column(
|
child: Column(
|
||||||
@@ -140,7 +140,10 @@ class _DesktopForgotPasswordPageState extends State<DesktopForgotPasswordPage> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.symmetric(vertical: 20.0.h()),
|
padding: EdgeInsets.symmetric(
|
||||||
|
vertical: 20.0.h(),
|
||||||
|
horizontal: 25.0.w(),
|
||||||
|
),
|
||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
borderRadius: BorderRadius.circular(32.0),
|
borderRadius: BorderRadius.circular(32.0),
|
||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
|
|||||||
Reference in New Issue
Block a user