StacMultiAction class
Executes multiple actions sequentially or concurrently.
If sync
is true, actions are awaited one-by-one; otherwise they are
fired without awaiting.
Dart example:
StacMultiAction(
actions: [
const StacSetValueAction(values: [{"key": "a", "value": 1}]),
const StacNetworkRequest(url: 'https://api.example.com')
],
sync: true,
);
JSON example:
{
"actionType": "multiAction",
"actions": [
{"actionType": "setValue", "values": [{"key": "a", "value": 1}]},
{"actionType": "networkRequest", "url": "https://api.example.com"}
],
"sync": true
}
- Inheritance
-
- Object
- StacAction
- StacMultiAction
- Annotations
-
- @JsonSerializable()
Constructors
-
StacMultiAction.new({required List<
StacAction> ? actions, bool sync = false}) -
Creates a StacMultiAction that executes multiple actions.
const
-
StacMultiAction.fromJson(Map<
String, dynamic> json) -
Creates a
StacMultiAction
from JSON.factory
Properties
-
actions
→ List<
StacAction> ? -
List of child actions to execute.
final
- actionType → String
-
The type identifier for this action.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
-
jsonData
→ Map<
String, dynamic> ? -
The raw JSON data associated with this action.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sync → bool
-
Whether to execute actions synchronously.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Converts this action to JSON.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited