diff --git a/app_navigator/lib/src/content_navigator.dart b/app_navigator/lib/src/content_navigator.dart index f57c4d0..1da8c7b 100644 --- a/app_navigator/lib/src/content_navigator.dart +++ b/app_navigator/lib/src/content_navigator.dart @@ -220,18 +220,21 @@ class ContentNavigatorBloc extends BaseBloc { void _popUntilPathOrPush(BuildContext context, ContentPath path) { var found = false; + Navigator.of(context).popUntil((route) { - // print('popUntil($path) checking ${route.settings.name}'); - var matches = route.settings.name != null && - path.matchesString(route.settings.name!); - if (!matches) { - if (_routeAwareManager != null) { - routeAwareManager.popPaths.add(route.settings.name!); + var name = route.settings.name; + if (name != null) { + var matches = path.matchesString(name); + if (!matches) { + if (_routeAwareManager != null) { + routeAwareManager.popPaths.add(name); + } } - } - found = found || matches; - return matches; + found = found || matches; + return matches; + } + return false; }); // print('popUntil($path) found $found'); if (!found) { diff --git a/app_navigator/pubspec.yaml b/app_navigator/pubspec.yaml index bc8c5e7..a4301c7 100644 --- a/app_navigator/pubspec.yaml +++ b/app_navigator/pubspec.yaml @@ -1,6 +1,6 @@ name: tekartik_app_navigator_flutter description: Experimental app navigator flutter -version: 0.4.5 +version: 0.4.6 publish_to: none environment: