Skip to content

Commit 99e6d43

Browse files
committed
Fix navigation order for Terminal and Settings pages
Corrects the navigation indices for Terminal (Logs) and Settings pages in both desktop and mobile dashboards and navbars, ensuring consistent navigation and page rendering.
1 parent 447085b commit 99e6d43

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

lib/screens/dashboard.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ class Dashboard extends ConsumerWidget {
7373
),
7474
kVSpacer10,
7575
IconButton(
76-
isSelected: railIdx == 4,
76+
isSelected: railIdx == 3,
7777
onPressed: () {
78-
ref.read(navRailIndexStateProvider.notifier).state = 4;
78+
ref.read(navRailIndexStateProvider.notifier).state = 3;
7979
},
8080
icon: const Icon(Icons.terminal),
8181
selectedIcon: const Icon(Icons.terminal),
@@ -108,7 +108,7 @@ class Dashboard extends ConsumerWidget {
108108
padding: const EdgeInsets.only(bottom: 16.0),
109109
child: NavbarButton(
110110
railIdx: railIdx,
111-
buttonIdx: 3,
111+
buttonIdx: 4,
112112
selectedIcon: Icons.settings,
113113
icon: Icons.settings_outlined,
114114
label: 'Settings',
@@ -134,8 +134,8 @@ class Dashboard extends ConsumerWidget {
134134
HomePage(),
135135
EnvironmentPage(),
136136
HistoryPage(),
137-
SettingsPage(),
138137
TerminalPage(),
138+
SettingsPage(),
139139
],
140140
),
141141
)

lib/screens/mobile/dashboard.dart

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,15 @@ class PageBranch extends ConsumerWidget {
7474
case 2:
7575
return const HistoryPage();
7676
case 3:
77+
return const PageBase(
78+
title: 'Logs',
79+
scaffoldBody: TerminalPage(),
80+
);
81+
case 4:
7782
return const PageBase(
7883
title: 'Settings',
7984
scaffoldBody: SettingsPage(),
8085
);
81-
case 4:
82-
return const TerminalPage();
8386
default:
8487
return const RequestResponsePage();
8588
}

lib/screens/mobile/navbar.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class BottomNavBar extends ConsumerWidget {
6060
Expanded(
6161
child: NavbarButton(
6262
railIdx: railIdx,
63-
buttonIdx: 4,
63+
buttonIdx: 3,
6464
selectedIcon: Icons.terminal,
6565
icon: Icons.terminal,
6666
label: 'Logs',
@@ -69,7 +69,7 @@ class BottomNavBar extends ConsumerWidget {
6969
Expanded(
7070
child: NavbarButton(
7171
railIdx: railIdx,
72-
buttonIdx: 3,
72+
buttonIdx: 4,
7373
selectedIcon: Icons.settings,
7474
icon: Icons.settings_outlined,
7575
label: 'Settings',

0 commit comments

Comments
 (0)