StateScope class final

Stores key/value state for a single scope, keyed by ScopeId.

Constructors

StateScope(ScopeId scopeId)
Creates a StateScope for scopeId.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scopeId ScopeId
Gets the scope identifier.
final

Methods

contains<T>(String key) bool
Returns true when a value typed T is stored under key.
containsKey(String key) bool
Returns true when key has any stored value.
exportStates() Iterable<MapEntry<String, PortableValue>>
Returns all stored entries for export.
importState(String key, PortableValue state) → void
Directly imports state under key, bypassing the update queue.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readKeys() Set<String>
Returns the set of all stored keys.
readState<T>(String key) → T?
Reads the stored value for key as T, or null if absent.
toString() String
A string representation of this object.
inherited
writeState(Map<String, List<StateUpdate>> updates) → void
Applies a batch of updates to this scope.

Operators

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