From eb89dc3395a99668dca031e39a109631d66a7d9e Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Sun, 7 Nov 2021 14:08:35 +0200 Subject: [PATCH] fix navigator issues --- lib/screens/auth/verification_methods_screen.dart | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/screens/auth/verification_methods_screen.dart b/lib/screens/auth/verification_methods_screen.dart index 85c5090a..fc85db8f 100644 --- a/lib/screens/auth/verification_methods_screen.dart +++ b/lib/screens/auth/verification_methods_screen.dart @@ -550,10 +550,15 @@ class _VerificationMethodsScreenState extends State { Helpers.showErrorToast(authenticationViewModel.error); } else { await authenticationViewModel.onCheckActivationCodeSuccess(); - if(value !=null) - Navigator.pop(context); - Navigator.pop(context); - navigateToLandingPage(); + if(value !=null){ + if(Navigator.canPop(context)) + Navigator.pop(context); + } + if(Navigator.canPop(context)) + Navigator.pop(context); + navigateToLandingPage(); + + } }