Feat: fix bug for auth page
This commit is contained in:
parent
6516cc7c39
commit
e7d36fdaac
|
@ -20,6 +20,10 @@ class ForgetPasswordScreen extends StatefulWidget {
|
|||
}
|
||||
|
||||
class _ForgetPasswordScreenState extends State<ForgetPasswordScreen> {
|
||||
final String? role = Get.arguments as String;
|
||||
final TextEditingController emailController = TextEditingController();
|
||||
final _formKey = GlobalKey<FormState>();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
|
@ -29,33 +33,34 @@ class _ForgetPasswordScreenState extends State<ForgetPasswordScreen> {
|
|||
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 16.h),
|
||||
child: SingleChildScrollView(
|
||||
child: Form(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
HeaderText(
|
||||
firstText: 'Atur\nUlang Password',
|
||||
secondText:
|
||||
'Jangan khawatir, kami akan mengirimkan petunjuk atur ulang password Anda',
|
||||
),
|
||||
SizedBox(height: 10.h),
|
||||
Center(
|
||||
child: SvgPicture.asset('assets/images/taxi_homework.svg')),
|
||||
SizedBox(height: 10.h),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 8.w),
|
||||
child: TypographyStyles.body(
|
||||
'Email',
|
||||
color: GrayColors.gray800,
|
||||
fontWeight: FontWeight.w500,
|
||||
key: _formKey,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
HeaderText(
|
||||
firstText: 'Atur\nUlang Password',
|
||||
secondText: 'Jangan khawatir, kami akan mengirimkan petunjuk atur ulang password Anda',
|
||||
),
|
||||
),
|
||||
SizedBox(height: 16.h),
|
||||
InputForm(
|
||||
hintText: 'example@gmail.com',
|
||||
svgIconPath: 'assets/icons/ic_email.svg',
|
||||
),
|
||||
],
|
||||
)),
|
||||
SizedBox(height: 10.h),
|
||||
Center(child: SvgPicture.asset('assets/images/taxi_homework.svg')),
|
||||
SizedBox(height: 10.h),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 8.w),
|
||||
child: TypographyStyles.body(
|
||||
'Email',
|
||||
color: GrayColors.gray800,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 16.h),
|
||||
InputForm(
|
||||
controller: emailController,
|
||||
hintText: 'example@gmail.com',
|
||||
svgIconPath: 'assets/icons/ic_email.svg',
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -77,7 +82,7 @@ class _ForgetPasswordScreenState extends State<ForgetPasswordScreen> {
|
|||
text: 'Kembali untuk Masuk',
|
||||
textColor: GrayColors.gray500,
|
||||
onTap: () {
|
||||
Get.toNamed(Routes.LOGIN);
|
||||
Get.toNamed(Routes.LOGIN, arguments: role);
|
||||
},
|
||||
),
|
||||
)
|
||||
|
|
|
@ -87,7 +87,7 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||
SizedBox(height: 32.h),
|
||||
ForgetPasswordText(
|
||||
onTab: () {
|
||||
Get.toNamed(Routes.FORGETPASSWORD);
|
||||
Get.toNamed(Routes.FORGETPASSWORD, arguments: role);
|
||||
},
|
||||
),
|
||||
SizedBox(height: 40.h),
|
||||
|
@ -114,7 +114,7 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||
text: 'Kembali ke sebelumnya',
|
||||
textColor: GrayColors.gray500,
|
||||
onTap: () {
|
||||
Get.back();
|
||||
Get.offAllNamed(Routes.ONBOARDING);
|
||||
},
|
||||
),
|
||||
)
|
||||
|
|
|
@ -167,7 +167,7 @@ class _RegisterScreenState extends State<RegisterScreen> {
|
|||
firstText: 'Sudah punya akun?',
|
||||
secondText: 'Masuk',
|
||||
onTab: () {
|
||||
Get.toNamed(Routes.LOGIN);
|
||||
Get.toNamed(Routes.LOGIN, arguments: role);
|
||||
},
|
||||
),
|
||||
],
|
||||
|
|
Loading…
Reference in New Issue