Finish the login

merge-requests/193/head
Elham Rababah 5 years ago
parent 9b0731d5c8
commit 9a614b25b5

@ -386,7 +386,7 @@ class _VerifyAccountState extends State<VerifyAccount> {
zipCode: _loggedUser['ZipCode'],
mobileNumber: _loggedUser['MobileNumber'],
projectID: await sharedPref.getInt(PROJECT_ID),
logInTokenID: await sharedPref.getInt(LOGIN_TOKEN_ID),
logInTokenID: await sharedPref.getString(LOGIN_TOKEN_ID),
doctorID: 1485,
// TODO do it dynamic
activationCode: activationCode,

@ -293,6 +293,7 @@ class _VerificationMethodsState extends State<VerificationMethods> {
widget.changeLoadingStata(false);
if (res['MessageStatus'] == 1) {
print("VerificationCode : "+ res["VerificationCode"]);
sharedPref.setString(VIDA_AUTH_TOKEN_ID, res["VidaAuthTokenID"]);
sharedPref.setString(VIDA_REFRESH_TOKEN_ID, res["VidaRefreshTokenID"]);
sharedPref.setString(LOGIN_TOKEN_ID, res["LogInTokenID"]);
@ -311,33 +312,7 @@ class _VerificationMethodsState extends State<VerificationMethods> {
});
} catch (e) {}
// Map<String, dynamic> model = {
// "LogInTokenID": _loggedUser['LogInTokenID'],
// "Channel": 9,
// "MobileNumber": _loggedUser['MobileNumber'],
// "IPAdress": "11.11.11.11",
// "LanguageID": 2,
// "ProjectID": 15, //TODO : this should become daynamci
// "ZipCode": _loggedUser['ZipCode'],
// "UserName": _loggedUser['List_MemberInformation'][0]['MemberID'],
// "OTP_SendType": oTPSendType
// };
// authProv.sendActivationCodeByOtpNotificationType(model).then((res) {
// widget.changeLoadingStata(false);
//
// if (res['MessageStatus'] == 1) {
// Navigator.of(context).pushReplacementNamed(VERIFY_ACCOUNT,
// arguments: {'model': model});
// } else {
// print(res['ErrorEndUserMessage']);
// helpers.showErrorToast(res['ErrorEndUserMessage']);
// }
// }).catchError((err) {
// print('$err');
// widget.changeLoadingStata(false);
//
// helpers.showErrorToast();
// });
} else {
// TODO route to this page with parameters to inicate we should present 2 option
if (Platform.isAndroid && oTPSendType == 3) {

Loading…
Cancel
Save