I want to develop a logout button that will send me to the log in route and remove all other routes from the Navigator. The documentation doesn\'t seem to explain h
Navigator
i can done with the following code snippet :
Navigator.of(context).pushAndRemoveUntil(MaterialPageRoute(builder: (context) => LoginScreen()), (Route route) => false),
if you want to remove all the route below the pushed route, RoutePredicate always return false, e.g (Route route) => false.