Flutter remove all routes. I was able to accomplish this with the following code:
1 2 | Navigator.of(context) .pushNamedAndRemoveUntil('/login', (Route<dynamic> route) => false); |
The secret here is using a RoutePredicate that always returns false (Route
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.