WritableState<Value> class

State with read and write access.

Implemented types

Constructors

WritableState([Value? value])
State with read and write access.

Properties

ctx StateContext<Value>
A handle to the StateContext.
final
hashCode int
The hash code for this object.
no setterinherited
notification ↔ StateNotification?
Event received from a parent state.
getter/setter pairoverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state ↔ Value
The current value of the state.
getter/setter pairoverride-getter

Methods

call() → Value
Retrieve the current value of the state. If called within a derived state it will add the state as its child.
override
mutate(StateMutator<Value> mutator) → void
Mutate the state in place. A mutator must be provided.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notify(StateNotification notification) → void
Notify this State that it should be updated and react accordingly to the StateNotification sent to it.
override
set(Value value) → void
Directly set the new value. Must be of the same type
toString() String
A string representation of this object.
inherited
update(StateUpdater<Value> setter) → void
Update the state based on the current state. A setter must be provided.

Operators

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