StackList<T> class Null safety

A classic Stack of items with a push and pop method.

Constructors

StackList()
StackList.fromList(List<T> initialStack)
Creates a stack from initialStack by pushing each element of the list onto the stack from first to last.

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
isEmpty bool
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

asList() List<T>
The of items in the stack
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
peek() → T
returns the item onf the top of the stack but does not remove the item.
pop() → T
return and remove an item from the stack.
push(T item) → void
push an item onto th stack.
toString() String
A string representation of this object. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited