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 new stack data structure
hunteraraujo6bd3136fe066
diff --git a/frontend/lib/utils/stack.dart b/frontend/lib/utils/stack.dartnew file mode 100644index 0000000000..1ddbae55c4--- /dev/null+++ b/frontend/lib/utils/stack.dart@@ -0,0 +1,20 @@+class Stack<T> {+ final List<T> _list = [];++ void push(T element) {+ _list.add(element);+ }++ T pop() {+ var element = _list.last;+ _list.removeLast();+ return element;+ }++ T peek() {+ return _list.last;+ }++ bool get isEmpty => _list.isEmpty;+ bool get isNotEmpty => _list.isNotEmpty;+}