bool isCurrent(String routeName) { bool isCurrent = false; popUntil((route) { if (route.settings.name == routeName) { isCurrent = true; } return true; }); return isCurrent; }