StateBlocState class
Contains the StateFieldState of all of the registered StateFields in the StateBloc with a Bloc.key equal to blocKey.
To get a specific StateFieldState use the list access operator with the StateFieldState.fieldID as the parameter:
stateBlocState\[fieldState.key\];
The list access operator CANNOT be used to set or add StateFieldStates.
To do use the StateBlocState.fromBuilder() constructor and set stateMap.
stateMap itself cannot be directly modified as it is a BuiltMap but a new
one can be created by call the BuiltMap.toBuilder()
function: d
(stateBlocState.stateMap.toBuilder()..add(fieldState)).build()
The stateMap can also be used to get a specific StateFieldState.
- Implemented types
- Annotations
- @BuiltValue(nestedBuilders: false)
Constructors
-
StateBlocState({BuiltMap<
FieldID, StateFieldState> stateMap, BuiltList<StateFieldState> stateList }) -
Instaniates a StateBlocState from a collection. [...]
factory
- StateBlocState.deserialize(String serialized)
-
Deserializes a serialized StateBlocState using the default serialization format. [...]
factory
- StateBlocState.fromBuilder([dynamic updates(StateBlocStateBuilder b) ])
-
factory
- StateBlocState.fromJson(String jsonString)
-
Deserializes a serialized StateBlocState using the standard json format. [...]
factory
Properties
- blocKey → String
-
The key of the StateBloc that this StateBlocState represents. [...]
@memoized, read-only
-
stateMap
→ BuiltMap<
FieldID, StateFieldState> -
A BuiltMap of the
StateFieldState.key
to StateFieldStates.read-only - hashCode → int
-
The hash code for this object.
read-only, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
serialize(
) → String - Serializes this StateBlocState using the default serialization format. [...]
-
toJson(
) → String - Serializes this StateBlocState using the standard json format. [...]
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
rebuild(
dynamic updates(StateBlocStateBuilder builder)) → StateBlocState -
Rebuilds the instance. [...]
inherited
-
toBuilder(
) → StateBlocStateBuilder -
Converts the instance to a builder
B
. [...]inherited -
toString(
) → String -
Returns a string representation of this object.
inherited
Operators
-
operator [](
FieldID fieldID) → StateFieldState -
Returns the StateFieldState associated with the
StateFieldState.key
. -
operator ==(
dynamic other) → bool -
The equality operator.
inherited
Static Properties
-
serializer
→ Serializer<
StateBlocState> -
The Serializer for this class.
read-only