StackControl<T> class

Inheritance
Available Extensions

Constructors

StackControl({T? value, bool root = false})

Properties

canPop bool
Checks if stack contains enough items to pop last one.
no setter
hashCode int
The hash code for this object.
no setterinherited
internalData ↔ dynamic
getter/setter pairinherited
isActive bool
no setteroverride
isEmpty bool
no setterinherited
isNotEmpty bool
no setterinherited
isRooted bool
First value is root. pop until first value.
no setter
isValid bool
no setteroverride
length int
Number of items in stack.
no setter
root ↔ T?
Root/First value of stack.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value ↔ T?
Current/Last value of stack.
getter/setter pairinherited-setteroverride-getter

Methods

cancel(ControlSubscription<T?> subscription) → void
override
cast<U>() ObservableValue<U>
inherited
clear() → void
Clears all values in stack. Even if isRooted is set to true.
contains(T item) bool
Checks if given item is in stack.
disableRoot() → void
Disables root value. So stack can pop all values.
dispose() → void
Used to clear and dispose object. After this method call is object typically unusable and ready for GC. Can be called multiple times!
override
Pops until last item in stack. Returns true if there is nothing to pop.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notify() → void
override
pop() → void
Pops last value from stack.
popTo(T value) → void
Pops to given value. All next values are removed from stack.
popToFirst() → void
Pops to root/first value of stack. All next values are removed from stack.
popToLast() → void
Pops to last value of stack. All previous values are removed from stack.
popUntil(Predicate<T?> test) → void
Pops to value of given test. All next values are removed from stack.
push(T? value) → void
Push given value to end of stack.
pushStack(Iterable<T?> stack, {bool clearOrigin = false}) → void
Pushes whole stack. Set clearOrigin to clear previous stack.
pushUnique(T value) → void
Push given value to end of stack. Previous occurrence of value is removed from stack.
setValue(T? value, {bool notify = true, bool forceNotify = false}) → void
override
subscribe(ValueCallback<T?> action, {bool current = true, dynamic args}) ControlSubscription<T?>
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](int index) → dynamic
Returns value in stack by index.