State<T> class
A state for a component or a state provider.
If a state of a component changes, the component and its children will be rerendered. If the state of a state provider changes, all children of the state provider will be rerendered.
Important: State changes has to executed using the update or set functions, otherwise Deact will not recognize, that the state has changed.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value ↔ T
-
Returns the actual state object.
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
set(
T setter(T state)) → void -
Executes to provided
setter
function to replace the complete state. This function is useful for immutable state objects. After thesetter
function was executed, the component and its children will be rerendered using the new state. -
toString(
) → String -
A string representation of this object.
inherited
-
update(
void updater(T state)) → void -
Executes to provided
updater
function to update a part of the state. This function is useful for complex mutable state objects. After theupdater
function was executed, the component and its children will be rerendered using the new state.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited