Skip to content
3 changes: 3 additions & 0 deletions packages/go_router/lib/src/delegate.dart
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ class GoRouterDelegate extends RouterDelegate<RouteMatchList>
if (navigatorKey.currentState?.canPop() ?? false) {
return true;
}
if (currentConfiguration.matches.isEmpty) {
return false;
}
RouteMatchBase walker = currentConfiguration.matches.last;
while (walker is ShellRouteMatch) {
if (walker.navigatorKey.currentState?.canPop() ?? false) {
Expand Down