Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

Add SideBarView with Toggleable Icons

hunteraraujo0e977e681887
diff --git a/frontend/lib/views/side_bar_view.dart b/frontend/lib/views/side_bar_view.dart
new file mode 100644
index 0000000000..f0f595e80d
--- /dev/null
+++ b/frontend/lib/views/side_bar_view.dart
@@ -0,0 +1,41 @@
+import 'package:flutter/material.dart';
+
+class SideBarView extends StatelessWidget {
+ final ValueNotifier<String> selectedViewNotifier;
+
+ SideBarView({required this.selectedViewNotifier});
+
+ @override
+ Widget build(BuildContext context) {
+ return Material(
+ child: ValueListenableBuilder(
+ valueListenable: selectedViewNotifier,
+ builder: (context, String selectedView, _) {
+ return SizedBox(
+ width: 60,
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ IconButton(
+ splashRadius: 0.1,
+ color:
+ selectedView == 'TaskView' ? Colors.blue : Colors.black,
+ icon: Icon(Icons.chat),
+ onPressed: () => selectedViewNotifier.value = 'TaskView',
+ ),
+ IconButton(
+ splashRadius: 0.1,
+ color: selectedView == 'SkillTreeView'
+ ? Colors.blue
+ : Colors.black,
+ icon: Icon(Icons.emoji_events), // trophy icon
+ onPressed: () =>
+ selectedViewNotifier.value = 'SkillTreeView',
+ ),
+ ],
+ ),
+ );
+ }),
+ );
+ }
+}