StateStyles class final
What a node and its descendants change to in each WidgetState: per
state, node id → a patch of that node's JSON (a merge patch: maps
merge, null removes, anything else replaces; see mergePatch). Later
states in WidgetState's order win where active states overlap.
- Annotations
-
- @immutable
Constructors
-
StateStyles([Map<
WidgetState, Map< patches = const {}])String, Json> > -
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isEmpty → bool
-
no setter
-
patches
→ Map<
WidgetState, Map< String, Json> > -
final
-
props
→ List<
Object?> -
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
targets
→ Set<
String> -
The ids of the nodes a state restyles.
no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
patchFor(
String id, Set< WidgetState> active, {List<PropDef< ? props}) → Json?Object?> > -
The merged patch of node
idwhileactivestates hold. With the node type'sprops, a union-typed value a later state writes in another form replaces the earlier one (mergeNodePatch). -
toJson(
) → Json -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromJson(
Object? json) → StateStyles
Constants
- none → const StateStyles