popUntilRouteWithPath method
Implementation
void popUntilRouteWithPath(String path) {
popUntil((route) {
if ((route.settings is StackedPage)) {
return (route.settings as StackedPage).routeData.match == path;
}
// Assuming pageless routes are either dialogs or bottomSheetModals
// and the user set a path as in RouteSettings(name: path) when showing theme
return route.settings.name == path;
});
}