AlfredItem class final

AlfredItem implements all the properties Alfred's Script Filter JSON Format

Each AlfredItem describes a result row displayed in Alfred. The three obvious elements are the ones you see in an Alfred result row - title, subtitle and icon.

Annotations
  • @autoequal
  • @CopyWith()
  • @JsonSerializable(explicitToJson: true)

Constructors

AlfredItem({required String title, AlfredItemType type = AlfredItemType.Default, bool valid = false, String? subtitle, String? arg, String? autocomplete, String? uid, AlfredItemIcon? icon, AlfredItemText? text, String? quickLookUrl, String? match, Map<Set<AlfredItemModKey>, AlfredItemMod>? mods, dynamic action})
const
AlfredItem.fromJson(Map<String, dynamic> json)
factory

Properties

action → dynamic
action : Map<String, dynamic> | List<String> | String (optional)
final
arg String?
The argument which is passed through the workflow to the connected output action.
final
autocomplete String?
An optional but recommended string you can provide which is populated into Alfred's search field if the user auto-completes the selected result (⇥ by default).
final
hashCode int
The hash code for this object.
no setterinherited
icon AlfredItemIcon?
The icon displayed in the result row.
final
match String?
From Alfred 3.5, the match field enables you to define what Alfred matches against when the workflow is set to "Alfred Filters Results".
final
mods Map<Set<AlfredItemModKey>, AlfredItemMod>?
The mods give you control over how the modifier keys react.
final
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
quickLookUrl String?
A Quick Look URL which will be visible if the user uses the Quick Look feature within Alfred (tapping shift, or ⌘Y).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
subtitle String?
The subtitle displayed in the result row. This element is optional.
final
text AlfredItemText?
The text element defines the text the user will get when copying the selected result row with ⌘C or displaying large type with ⌘L.
final
title String
The title displayed in the result row. There are no options for this element and it is essential that this element is populated.
final
type → AlfredItemType
type : AlfredItemType.Default | AlfredItemType.File | AlfredItemType.FileSkipcheck (optional, default = AlfredItemType.Default)
final
uid String?
This is a unique identifier for the item which allows help Alfred to learn about this item for subsequent sorting and ordering of the user's actioned results.
final
valid bool
valid : true | false (optional, default = false)
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited