ConditionalTreeedState<T> class

Special variant of TreeedState type with new methods when and whenEquals.

Inheritance

Constructors

ConditionalTreeedState(T value)
Creates a new instance of ConditionalTreeedState which is a special variant of TreeedState. 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 set function but you can await it.
inherited
asyncTrigger() Future<void>
The same as trigger function but you can await it.
inherited
dispose() → void
Clears everything.
override
listen(void fn(T)) → void
Adds the fn function 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 fn function from the listeners list.
inherited
when(bool condition(T), void action(T)) → void
Creates an immortal observer of the value and calls the action if condition returns true.
whenEquals(T value, void action()) → void
Creates an immortal observer of the value and calls the action if wrapped value is equal to a provided constant value.

Operators

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