AFComponentState class abstract
The root class for both state and state views
- Inheritance
-
- Object
- AFStateModelAccess
- AFComponentState
- Implementers
- Annotations
Constructors
-
AFComponentState({required Map<
String, Object> models, required AFCreateComponentStateDelegate create})
Properties
-
allModels
→ Iterable<
Object> -
Returns all the model objects
no setteroverride
- create → AFCreateComponentStateDelegate
-
final
- hashCode → int
-
The hash code for this object.
no setteroverride
-
models
→ Map<
String, Object> -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copyWith(
List< Object> toIntegrate) → AFComponentState - Returns a new state with the new objects integrated at the root, overriding or augmenting the existing objects.
-
copyWithOne(
Object toIntegrate) → AFComponentState -
createWith(
Map< String, Object> models) → AFComponentState -
findChildWidgetParam<
TRouteParam extends AFRouteParam> (AFWidgetID widgetId) → TRouteParam -
override
-
findChildWidgetParamOrNull<
TRouteParam extends AFRouteParam> (AFWidgetID widgetId) → TRouteParam? -
override
-
findId<
T extends Object> (String id) → T -
Returns the object value for the specified String key.
override
-
findIdOrNull<
T extends Object> (String id) → T? -
Returns the object value for the specified String key, allows null or missing values.
override
-
findModelWithCustomKey<
T> (String key) → T - Same as findId
-
findModelWithCustomKeyOrNull<
T extends Object?> (String key) → T? - Same as findIdOrNull
-
findScreenParam<
TRouteParam extends AFRouteParam> (AFScreenID screenId) → TRouteParam -
override
-
findScreenParamOrNull<
TRouteParam extends AFRouteParam> (AFScreenID screenId) → TRouteParam? -
override
-
findType<
T extends Object> () → T -
Returns the object value for the type T
override
-
findTypeOrNull<
T extends Object> () → T? -
Returns the object value for the type T, allows null or missing values.
override
-
mergeWith(
AFComponentState other) → AFComponentState -
Returns a new state, which overrides or augments this object's models with those from
other. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reviseModels(
List< Object> toIntegrate) → AFComponentState -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
createModels(
Iterable< Object> toIntegrate) → Map<String, Object> - Returns the map of type names to objects that the constructor's models parameter expects.
-
empty(
) → Map< String, Object> - / Returns an empty map of type names to objects.
-
integrate(
Map< String, Object> original, Iterable<Object> toIntegrate) → Map<String, Object> - Utility used to augment an existing mapping of type names to objects.