Reaction class final
A trigger and the actions it runs, in order: one chain. A blocking action is awaited before the next; a failing one stops the chain. JSON:
{"id": "r1", "name": "Add one", "trigger": {"type": "click"},
"actions": [{"type": "setVariable", "variable": "count", "op": "add", "value": "1"}]}
- Annotations
-
- @immutable
Constructors
Properties
-
actions
→ List<
ActionDef> -
final
-
allActions
→ Iterable<
ActionDef> -
Every action, nested ones included, depth first.
no setter
- hashCode → int
-
The hash code for this object.
no setteroverride
- id → String
-
final
- name → String
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- trigger → Trigger
-
final
- type → TriggerType
-
no setter
Methods
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
fromJson(
Object? json, {Catalog? catalog}) → Reaction? -
Decodes a reaction, its actions with
catalog(default: Catalog.current); null without a known trigger. -
listFromJson(
Object? json, {Catalog? catalog}) → List< Reaction>