action property

  1. @JsonKey.new(includeIfNull: false, toJson: _actionToJson, fromJson: _actionFromJson)
dynamic action
final

action : Map<String, dynamic> | List<String> | String (optional)

This element defines the Universal Action items used when actioning the result, and overrides the arg being used for actioning. The action key can take a String or List<String> for simple types, and the content type will automatically be derived by Alfred to file, url, or text.

  # Single Item:
  action: "Alfred is Great"

  # Multiple Items:
  action: <String>["Alfred is Great", "I use him all day long"]

  # For control over the content type of the action, you can use an object with typed keys:
  action: <String, dynamic>{
    "text": <String>["one", "two", "three"],
    "url": "https://www.alfredapp.com",
    "file": "~/Desktop",
    "auto": "~/Pictures"
  }

Implementation

@JsonKey(
  includeIfNull: false,
  toJson: _actionToJson,
  fromJson: _actionFromJson,
)
final dynamic action;