mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2026-02-09 08:14:27 +01:00
Add Settings Tab to SideBarView
This commit augments the `SideBarView` by introducing a new `IconButton` that represents a tab for the newly created `SettingsView`. This enhancement allows users to navigate to the settings page directly from the sidebar, improving accessibility to app configuration options. Key Changes: - A new `IconButton` with a settings icon has been added to the sidebar’s `Column` widget. - Selecting the settings tab updates the `selectedViewNotifier.value` to `'SettingsView'`, indicating the user's intent to navigate to the settings page. - Visual feedback is provided by altering the color of the settings icon based on whether the settings tab is currently selected. This addition ensures seamless integration of the `SettingsView` into the existing navigation structure, enabling users to easily configure app settings.
This commit is contained in:
@@ -35,11 +35,20 @@ class SideBarView extends StatelessWidget {
|
||||
color: selectedView == 'SkillTreeView'
|
||||
? Colors.blue
|
||||
: Colors.black,
|
||||
icon: const Icon(Icons.emoji_events), // trophy icon
|
||||
icon: const Icon(Icons.emoji_events),
|
||||
onPressed: skillTreeViewModel.isBenchmarkRunning
|
||||
? null
|
||||
: () => selectedViewNotifier.value = 'SkillTreeView',
|
||||
),
|
||||
IconButton(
|
||||
splashRadius: 0.1,
|
||||
color: selectedView == 'SettingsView'
|
||||
? Colors.blue
|
||||
: Colors.black,
|
||||
icon: const Icon(Icons.settings),
|
||||
onPressed: () =>
|
||||
selectedViewNotifier.value = 'SettingsView',
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user