StateSlot<T > class
Constructors
StateSlot (String name , AppStateProtocol state , {T caster (dynamic value )? })
(en) Do not call this constructor directly.
It is designed to be called internally by SimpleAppState.
Properties
caster
→ T Function(dynamic value ) ?
final
hashCode
→ int
The hash code for this object.
no setter override
name
→ String
final
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
state
→ AppStateProtocol
final
Methods
get ()
→ T
(en) Returns a deep copy of this slot's current value.
The slot must be initialized before calling this method.
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
set (T value )
→ void
(en) Set value to this slot.
The value you set will be deep-copied internally.
Any listeners associated with the slot will be notified of the change.
toString ()
→ String
A string representation of this object.
inherited
update (T builder (T oldCopy ) )
→ void
(en) Update value using previous value.
builder is passed an internally deep-copied value.
Any listeners associated with the slot will be notified of the change.