StateHook<T> class
The return value of useState.
The current value of the state is available via value and functions to update it are available via set and setWithUpdater.
Note: there are two rules for using Hooks:
- Only call Hooks at the top level.
- Only call Hooks from inside a DartFunctionComponent.
Learn more: reactjs.org/docs/hooks-state.html.
- Annotations
-
- @sealed
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 of the state.
no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
set(
T newValue) → void -
Updates value to
newValue
. -
setWithUpdater(
T computeNewValue(T oldValue)) → void -
Updates value to the return value of
computeNewValue
. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited