1. Import
This commit is contained in:
commit
cb4525a774
165 files changed
+14763
No files matched your search
@@ -0,0 +1,17 @@
|
||||
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();
|
||||
}
|
||||
Reference in new issue
Block a user