StateScope class final
Stores key/value state for a single scope, keyed by ScopeId.
Constructors
- StateScope(ScopeId scopeId)
-
Creates a StateScope for
scopeId.
Properties
Methods
-
contains<
T> (String key) → bool -
Returns
truewhen a value typedTis stored underkey. -
containsKey(
String key) → bool -
Returns
truewhenkeyhas any stored value. -
exportStates(
) → Iterable< MapEntry< String, PortableValue> > - Returns all stored entries for export.
-
importState(
String key, PortableValue state) → void -
Directly imports
stateunderkey, 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
keyasT, ornullif absent. -
toString(
) → String -
A string representation of this object.
inherited
-
writeState(
Map< String, List< updates) → voidStateUpdate> > -
Applies a batch of
updatesto this scope.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited