How to get current route path in Flutter?
ModalRoute should give you the exact route name ModalRoute.of(context).settings.name if you use Navigator.popuntil.. check this other answer out by RĂ©mi Rousselet https://stackoverflow.com/a/50817399/5921185