diff --git a/ui/lib/main.dart b/ui/lib/main.dart index 165f4b9..a7f6814 100644 --- a/ui/lib/main.dart +++ b/ui/lib/main.dart @@ -60,7 +60,7 @@ class _MyAppState extends ConsumerState { ); }, branches: [ - StatefulShellBranch(routes: [ + StatefulShellBranch(initialLocation: WelcomePage.routeTv, routes: [ GoRoute( path: WelcomePage.routeTv, pageBuilder: (context, state) => buildPageWithDefaultTransition( @@ -81,7 +81,7 @@ class _MyAppState extends ConsumerState { child: SearchPage(query: state.uri.queryParameters["query"])), ), ]), - StatefulShellBranch(routes: [ + StatefulShellBranch(initialLocation: WelcomePage.routeMoivie, routes: [ GoRoute( path: WelcomePage.routeMoivie, pageBuilder: (context, state) => buildPageWithDefaultTransition( @@ -249,7 +249,9 @@ class _MainSkeletonState extends State { ), useDrawer: false, selectedIndex: widget.body.currentIndex, - onSelectedIndexChange: (p0) => widget.body.goBranch(p0), + onSelectedIndexChange: (p0) => widget.body + .goBranch(p0, initialLocation: p0 == widget.body.currentIndex), + destinations: const [ NavigationDestination( icon: Icon(Icons.live_tv_outlined),