Is it possible to use Navigator.popUntil with routes that do not have fixed names?
I have a route created the following way:
final _key_homepage =
You should add a setting when pushing your route; with a custom name
Navigator.pushReplacement( context, MaterialPageRoute( settings: RouteSettings(name: "Foo"), builder: ..., ), );
Then you can use popUntil as you'd do with named routes
popUntil
Navigator.popUntil(context, ModalRoute.withName("Foo"))