Files
hartmann-foto_documentation/hartmann-foto-documentation-frontend/lib/utils/global_stack.dart
2026-01-21 16:08:09 +01:00

17 lines
288 B
Dart

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