Fix verification methods screen

merge-requests/769/head
Mohammad Aljammal 5 years ago
parent eb40cc819d
commit 3be4fb2986

@ -283,7 +283,7 @@ const TRANSACTION_NO = 0;
const LANGUAGE_ID = 2; const LANGUAGE_ID = 2;
const STAMP = '2020-04-27T12:17:17.721Z'; const STAMP = '2020-04-27T12:17:17.721Z';
const IP_ADDRESS = '9.9.9.9'; const IP_ADDRESS = '9.9.9.9';
const VERSION_ID = 6.1; const VERSION_ID = 6.2;
const CHANNEL = 9; const CHANNEL = 9;
const SESSION_ID = 'BlUSkYymTt'; const SESSION_ID = 'BlUSkYymTt';
const IS_LOGIN_FOR_DOCTOR_APP = true; const IS_LOGIN_FOR_DOCTOR_APP = true;

@ -45,7 +45,7 @@ class VerificationMethodsScreen extends StatefulWidget {
} }
class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> { class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
ProjectViewModel projectsProvider; ProjectViewModel projectsProvider;
bool isMoreOption = false; bool isMoreOption = false;
bool onlySMSBox = false; bool onlySMSBox = false;
@ -409,13 +409,6 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
onTap: () { onTap: () {
authenticationViewModel.deleteUser(); authenticationViewModel.deleteUser();
authenticationViewModel.setAppStatus(APP_STATUS.UNAUTHENTICATED); authenticationViewModel.setAppStatus(APP_STATUS.UNAUTHENTICATED);
// Navigator.pushAndRemoveUntil(
// AppGlobal.CONTEX,
// FadePage(
// page: RootPage(),
// ),
// (r) => false);
// Navigator.of(context).pushNamed(LOGIN);
}, },
), ),
@ -548,13 +541,14 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
} }
} }
checkActivationCode({value}) async { checkActivationCode({String value}) async {
await authenticationViewModel.checkActivationCodeForDoctorApp(activationCode: value); await authenticationViewModel.checkActivationCodeForDoctorApp(activationCode: value);
if (authenticationViewModel.state == ViewState.ErrorLocal) { if (authenticationViewModel.state == ViewState.ErrorLocal) {
Navigator.pop(context); Navigator.pop(context);
Helpers.showErrorToast(authenticationViewModel.error); Helpers.showErrorToast(authenticationViewModel.error);
} else { } else {
await authenticationViewModel.onCheckActivationCodeSuccess(); await authenticationViewModel.onCheckActivationCodeSuccess();
if(value !=null)
Navigator.pop(context); Navigator.pop(context);
Navigator.pop(context); Navigator.pop(context);
navigateToLandingPage(); navigateToLandingPage();
@ -569,6 +563,4 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
} }
} }
} }

Loading…
Cancel
Save