Jonny Borges
Committed by GitHub

Merge pull request #2591 from N0Noorz/fix_popRoute

fix: on backbutton press always close the app
@@ -784,12 +784,13 @@ class GetDelegate extends RouterDelegate<RouteDecoder> @@ -784,12 +784,13 @@ class GetDelegate extends RouterDelegate<RouteDecoder>
784 //Returning false will cause the entire app to be popped. 784 //Returning false will cause the entire app to be popped.
785 final wasPopup = await handlePopupRoutes(result: result); 785 final wasPopup = await handlePopupRoutes(result: result);
786 if (wasPopup) return true; 786 if (wasPopup) return true;
787 - final _popped = await _pop(popMode ?? backButtonPopMode, result);  
788 - notifyListeners();  
789 - if (_popped != null) {  
790 - //emulate the old pop with result 787 +
  788 + if (_canPop(popMode ?? backButtonPopMode)) {
  789 + await _pop(popMode ?? backButtonPopMode, result);
  790 + notifyListeners();
791 return true; 791 return true;
792 } 792 }
  793 +
793 return false; 794 return false;
794 } 795 }
795 796