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