Skip to content

Commit

Permalink
fix: add default behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-ding committed Nov 4, 2024
1 parent 3739f2c commit 1e2d8b8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ui/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class _MyAppState extends ConsumerState<MyApp> {
);
},
branches: [
StatefulShellBranch(routes: [
StatefulShellBranch(initialLocation: WelcomePage.routeTv, routes: [
GoRoute(
path: WelcomePage.routeTv,
pageBuilder: (context, state) => buildPageWithDefaultTransition(
Expand All @@ -81,7 +81,7 @@ class _MyAppState extends ConsumerState<MyApp> {
child: SearchPage(query: state.uri.queryParameters["query"])),
),
]),
StatefulShellBranch(routes: [
StatefulShellBranch(initialLocation: WelcomePage.routeMoivie, routes: [
GoRoute(
path: WelcomePage.routeMoivie,
pageBuilder: (context, state) => buildPageWithDefaultTransition(
Expand Down Expand Up @@ -249,7 +249,9 @@ class _MainSkeletonState extends State<MainSkeleton> {
),
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>[
NavigationDestination(
icon: Icon(Icons.live_tv_outlined),
Expand Down

0 comments on commit 1e2d8b8

Please sign in to comment.