File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -22,13 +22,6 @@ class AppShell extends StatelessWidget {
22
22
/// navigators in a stateful way.
23
23
final StatefulNavigationShell navigationShell;
24
24
25
- void _goBranch (int index) {
26
- navigationShell.goBranch (
27
- index,
28
- initialLocation: index == navigationShell.currentIndex,
29
- );
30
- }
31
-
32
25
@override
33
26
Widget build (BuildContext context) {
34
27
final l10n = context.l10n;
@@ -70,7 +63,12 @@ class AppShell extends StatelessWidget {
70
63
),
71
64
body: AdaptiveScaffold (
72
65
selectedIndex: navigationShell.currentIndex,
73
- onSelectedIndexChange: _goBranch,
66
+ onSelectedIndexChange: (index) {
67
+ navigationShell.goBranch (
68
+ index,
69
+ initialLocation: index == navigationShell.currentIndex,
70
+ );
71
+ },
74
72
destinations: [
75
73
NavigationDestination (
76
74
icon: const Icon (Icons .dashboard_outlined),
You can’t perform that action at this time.
0 commit comments