resetPasswordAPI function
Implementation
Future<ResetPassModel> resetPasswordAPI({required String email, required String password, required String confirmPass}) async {
appStore.setLoading(true);
try {
ResetPassModel res = ResetPassModel.fromMap(await handleResponse(await buildHttpResponse('${APIEndPoint.resetPassword}',
request: {
UserKeys.email: email.trim(),
UserKeys.password: password.trim(),
UserKeys.passwordConfirmation: confirmPass.trim(),
},
method: HttpMethod.POST)));
await appStore.setCurrentPassword(password.trim());
appStore.setLoading(false);
return res;
} catch (e) {
appStore.setLoading(false);
throw e;
}
}