|
|
|
|
@ -50,29 +50,27 @@ class _ForgotPasswordScreenState extends State<ForgotPasswordScreen> {
|
|
|
|
|
context,
|
|
|
|
|
1,
|
|
|
|
|
int.tryParse(_basicMemberInformation?.pMOBILENUMBER ?? ""),
|
|
|
|
|
(value,TextEditingController _pinPutController) async {
|
|
|
|
|
(value, TextEditingController _pinPutController) async {
|
|
|
|
|
Utils.showLoading(context);
|
|
|
|
|
try{
|
|
|
|
|
GenericResponseModel? genericResponseModel = await LoginApiClient().checkPublicActivationCode(value, employeeId.text);
|
|
|
|
|
if (genericResponseModel?.errorMessage != null) {
|
|
|
|
|
Utils.showToast(genericResponseModel?.errorMessage ?? "");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
Utils.hideLoading(context);
|
|
|
|
|
await Navigator.pushNamed(context, AppRoutes.newPassword, arguments: employeeId.text);
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
}catch(ex){
|
|
|
|
|
print(ex);
|
|
|
|
|
_pinPutController.clear();
|
|
|
|
|
otpFieldClear.value = "";
|
|
|
|
|
Utils.hideLoading(context);
|
|
|
|
|
Utils.handleException(ex, context, null);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
() => {
|
|
|
|
|
Navigator.pop(context),
|
|
|
|
|
try {
|
|
|
|
|
GenericResponseModel? genericResponseModel = await LoginApiClient().checkPublicActivationCode(value, employeeId.text);
|
|
|
|
|
if (genericResponseModel?.errorMessage != null) {
|
|
|
|
|
Utils.showToast(genericResponseModel?.errorMessage ?? "");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
Utils.hideLoading(context);
|
|
|
|
|
await Navigator.pushNamed(context, AppRoutes.newPassword, arguments: employeeId.text);
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
} catch (ex) {
|
|
|
|
|
print(ex);
|
|
|
|
|
_pinPutController.clear();
|
|
|
|
|
otpFieldClear.value = "";
|
|
|
|
|
Utils.hideLoading(context);
|
|
|
|
|
Utils.handleException(ex, context, null);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
() => {Navigator.pop(context)},
|
|
|
|
|
onResendCode: () {
|
|
|
|
|
performForgotPassword();
|
|
|
|
|
},
|
|
|
|
|
@ -87,13 +85,7 @@ class _ForgotPasswordScreenState extends State<ForgotPasswordScreen> {
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
return Scaffold(
|
|
|
|
|
appBar: AppBar(
|
|
|
|
|
backgroundColor: Colors.transparent,
|
|
|
|
|
leading: IconButton(
|
|
|
|
|
icon: const Icon(Icons.arrow_back_ios, color: MyColors.darkIconColor),
|
|
|
|
|
onPressed: () => Navigator.pop(context),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
appBar: AppBar(backgroundColor: Colors.transparent, leading: IconButton(icon: const Icon(Icons.arrow_back_ios, color: MyColors.darkIconColor), onPressed: () => Navigator.pop(context))),
|
|
|
|
|
body: Column(
|
|
|
|
|
children: [
|
|
|
|
|
//const SizedBox(height: 23),
|
|
|
|
|
@ -122,19 +114,19 @@ class _ForgotPasswordScreenState extends State<ForgotPasswordScreen> {
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
DefaultButton(
|
|
|
|
|
LocaleKeys.changePassword.tr(),
|
|
|
|
|
employeeId.text.isEmpty
|
|
|
|
|
? null
|
|
|
|
|
: () async {
|
|
|
|
|
performForgotPassword();
|
|
|
|
|
})
|
|
|
|
|
.insideContainer
|
|
|
|
|
LocaleKeys.changePassword.tr(),
|
|
|
|
|
employeeId.text.isEmpty
|
|
|
|
|
? null
|
|
|
|
|
: () async {
|
|
|
|
|
performForgotPassword();
|
|
|
|
|
},
|
|
|
|
|
).insideContainer,
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
|