ConditionalTreeedState<T> class
Special variant of TreeedState type with new methods when and whenEquals.
- Inheritance
-
- Object
- TreeedUpdatable<
T> - TreeedState<
T> - ConditionalTreeedState
Constructors
- ConditionalTreeedState(T value)
-
Creates a new instance of
ConditionalTreeedStatewhich is a special variant ofTreeedState. It adds new methods:
Properties
- get → T
-
Returns the stored value.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
asyncSet(
T value) → Future< void> -
The same as
setfunction but you can await it.inherited -
asyncTrigger(
) → Future< void> -
The same as
triggerfunction but you can await it.inherited -
dispose(
) → void -
Clears everything.
override
-
listen(
void fn(T)) → void -
Adds the
fnfunction to the listeners list.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
quietSet(
T value) → void -
Updating the stored value but without calling any listeners.
inherited
-
set(
T value) → void -
Updating the stored value and calling all listeners.
override
-
toString(
) → String -
A string representation of this object.
inherited
-
trigger(
) → void -
Triggers an updating for all listeners and providing actual value to them;
inherited
-
unlisten(
void fn(T)) → void -
Removes the
fnfunction from the listeners list.inherited -
when(
bool condition(T), void action(T)) → void -
Creates an immortal observer of the value and calls the
actionifconditionreturnstrue. -
whenEquals(
T value, void action()) → void -
Creates an immortal observer of the value and calls the
actionif wrapped value is equal to a provided constant value.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited