StateSetter<T> class
final
A ref-like state setter that supports direct and functional updates.
Calling the setter with a value replaces the state. Calling update lets a renderer apply an updater against the current state.
See https://react.dev/reference/react/useState#updating-state-based-on-the-previous-state.
Constructors
- StateSetter(void _setValue(T), void _setUpdater(T (T previous)))
-
Creates a state setter from renderer operations.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
call(
Object? value) → void -
Replaces state with
value. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
T updater(T previous)) → void - Updates state from its current value.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited