StateCell<T> class
A mutable state cell returned by SproutContext.useState. Setting value
marks the owning branch for rebuild (the setState analogue).
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
-
The current value.
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
set(
T update(T previous)) → void -
Functional update: applies
updateto the current value, then value=. Prefer this in async handlers to avoid read-modify-write races. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited