Files
2023-11-14 11:38:44 +01:00

17 lines
322 B
Dart

class WidgetStack<E> {
final _list = <E>[];
void push(E value) => _list.add(value);
E pop() => _list.removeLast();
E get peek => _list.last;
bool get isEmpty => _list.isEmpty;
bool get isNotEmpty => _list.isNotEmpty;
void clear() => _list.clear();
@override
String toString() => _list.toString();
}