ManagedComponentRef class final
A managed instance's reference (ComponentLink.managed): what it follows
and how it customizes the component without forking it.
JSON (sparse): {"channel": "beta", "pin": 4, "semver": "1.2.0", "digest": "…", "values": {"title": "Welcome"}, "slots": {"header": ["n7"]}, "events": {"onSuccess": [{"type": "navigate", …}]}, "tokens": {"primary": "#FF6200EE"}}. channel defaults to stable.
- Annotations
-
- @immutable
Constructors
Properties
- channel → ManagedChannel
-
The channel whose same-major releases the instance takes.
final
- digest → String
-
The snapshot version's digest, when known.
final
-
events
→ Map<
String, List< ActionDef> > -
The action chain run on each event, by event key.
final
- extra → Json
-
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- major → int
-
The snapshot's major (0 when its semver is unreadable).
no setter
- pin → int?
-
A version number the instance stays on: no update applies on its own.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- semver → String
-
The semver of the version its nodes were built from (the snapshot):
its major is the one updates stay within.
final
-
slotNodeIds
→ Iterable<
String> -
Every slot node id.
no setter
-
slots
→ Map<
String, List< String> > -
The instance's own nodes in each slot, by slot key: ids of top nodes
kept in the page under the slot's node.
final
- tokens → Json
-
Theme token overrides (ThemeTokens JSON keys → values).
final
- values → Json
-
Setting values the instance set, by setting key
(ComponentSetting.effectiveKey); a setting not here has the
version's value.
final
Methods
-
copyWith(
{ManagedChannel? channel, int? pin()?, String? semver, String? digest, Json? values, Map< String, List< ? slots, Map<String> >String, List< ? events, Json? tokens}) → ManagedComponentRefActionDef> > -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
remapped(
Map< String, String> ids) → ManagedComponentRef -
Slot node ids mapped by
ids(a copy of the tree with new ids). -
toJson(
) → Json -
toString(
) → String -
A string representation of this object.
override
-
withEvent(
String key, List< ActionDef> actions) → ManagedComponentRef -
With event
key's chain set toactions(empty: removed). -
withSlot(
String key, List< String> nodeIds) → ManagedComponentRef -
With slot
key's nodes set tonodeIds(empty: the version's default content). -
withValue(
String key, Object? value) → ManagedComponentRef -
With setting
keyset tovalue(null: back to the version's).
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
fromJson(
Object? json) → ManagedComponentRef? -
Null unless
jsonis an object.