mirror of
https://github.com/simon-ding/polaris.git
synced 2026-06-09 03:27:39 +08:00
fix: add default behavior
This commit is contained in:
@@ -60,7 +60,7 @@ class _MyAppState extends ConsumerState<MyApp> {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
branches: [
|
branches: [
|
||||||
StatefulShellBranch(routes: [
|
StatefulShellBranch(initialLocation: WelcomePage.routeTv, routes: [
|
||||||
GoRoute(
|
GoRoute(
|
||||||
path: WelcomePage.routeTv,
|
path: WelcomePage.routeTv,
|
||||||
pageBuilder: (context, state) => buildPageWithDefaultTransition(
|
pageBuilder: (context, state) => buildPageWithDefaultTransition(
|
||||||
@@ -81,7 +81,7 @@ class _MyAppState extends ConsumerState<MyApp> {
|
|||||||
child: SearchPage(query: state.uri.queryParameters["query"])),
|
child: SearchPage(query: state.uri.queryParameters["query"])),
|
||||||
),
|
),
|
||||||
]),
|
]),
|
||||||
StatefulShellBranch(routes: [
|
StatefulShellBranch(initialLocation: WelcomePage.routeMoivie, routes: [
|
||||||
GoRoute(
|
GoRoute(
|
||||||
path: WelcomePage.routeMoivie,
|
path: WelcomePage.routeMoivie,
|
||||||
pageBuilder: (context, state) => buildPageWithDefaultTransition(
|
pageBuilder: (context, state) => buildPageWithDefaultTransition(
|
||||||
@@ -249,7 +249,9 @@ class _MainSkeletonState extends State<MainSkeleton> {
|
|||||||
),
|
),
|
||||||
useDrawer: false,
|
useDrawer: false,
|
||||||
selectedIndex: widget.body.currentIndex,
|
selectedIndex: widget.body.currentIndex,
|
||||||
onSelectedIndexChange: (p0) => widget.body.goBranch(p0),
|
onSelectedIndexChange: (p0) => widget.body
|
||||||
|
.goBranch(p0, initialLocation: p0 == widget.body.currentIndex),
|
||||||
|
|
||||||
destinations: const <NavigationDestination>[
|
destinations: const <NavigationDestination>[
|
||||||
NavigationDestination(
|
NavigationDestination(
|
||||||
icon: Icon(Icons.live_tv_outlined),
|
icon: Icon(Icons.live_tv_outlined),
|
||||||
|
|||||||
Reference in New Issue
Block a user