diff --git a/flutter_client/lib/shared/routing.dart b/flutter_client/lib/shared/routing.dart index 532cf1e3..73c3eac5 100644 --- a/flutter_client/lib/shared/routing.dart +++ b/flutter_client/lib/shared/routing.dart @@ -85,6 +85,14 @@ GoRouter buildRouter(Ref ref) { }, ), ), + // /queue lives outside the ShellRoute too. Why: pushing /queue + // from /now-playing (which is also outside the shell) used to + // cause go_router to mount a second ShellRoute instance under + // the existing one, producing a duplicate page-key assertion + // (NavigatorState._debugCheckDuplicatedPageKeys). Top-level + // routes can stack on each other freely; shell-children can't + // when something on top of the shell is already routing. + GoRoute(path: '/queue', builder: (_, __) => const QueueScreen()), ShellRoute( builder: (ctx, state, child) => VersionGate(child: _ShellWithPlayerBar(child: child)), routes: [ @@ -105,7 +113,6 @@ GoRouter buildRouter(Ref ref) { seed: s.extra is AlbumRef ? s.extra as AlbumRef : null, ), ), - GoRoute(path: '/queue', builder: (_, __) => const QueueScreen()), GoRoute(path: '/search', builder: (_, __) => const SearchScreen()), GoRoute(path: '/library', builder: (_, __) => const LibraryScreen()), GoRoute(path: '/discover', builder: (_, __) => const DiscoverScreen()),