QuickAction class
An entity that executes an action when selected on the upper-right of a dictionary entry widget. An action is initialised at runtime in the initialisation step, and can be assigned to a quick action slot. When dictionary search results are displayed, the user can then tap on the icon representing the action to execute its functionality for a certain dictionary entry.
Constructors
Properties
- description → String
-
A longer description of what the action can do, or details left
by or regarding the developer.
final
-
descriptionLocalisation
→ Map<
String, String> -
Localisations for this action, where the key is a locale tag and
the value is the description of the action. If the value for the
current locale is non-null, it will be used instead of description.
final
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- icon → IconData
-
An icon that will show the action if activated by the user in the
quick menu.
final
- label → String
-
Name of the action that very shortly describes what it does.
final
-
labelLocalisation
→ Map<
String, String> -
Localisations for this action, where the key is a locale tag and
the value is the label of the action. If the value for the current
locale is non-null, it will be used instead of label.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
- showInSingleDictionary → bool
-
Whether or not to show this action in the single dictionary dropdown
options.
final
- uniqueKey → String
-
A unique name that allows distinguishing this type from others,
particularly for the purposes of differentiating between persistent
settings keys.
final
Methods
-
executeAction(
{required BuildContext context, required WidgetRef ref, required AppModel appModel, required CreatorModel creatorModel, required DictionaryHeading heading, required String? dictionaryName}) → Future< void> - Execute the functionality of this action.
-
getIconColor(
{required AppModel appModel, required DictionaryHeading heading}) → Future< Color?> - If non-null, sets a custom enabled color that this action should have for a certain condition in the application. By default, this is the foreground color.
-
getLocalisedDescription(
AppModel appModel) → String - Get the best localisation for the description of this action. If there is no localisation, the fallback is description.
-
getLocalisedLabel(
AppModel appModel) → String - Get the best localisation for the label of this action. If there is no localisation, the fallback is label.
-
initialise(
) → Future< void> - This function is run at startup or when changing languages. It is not called again if already run.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
prepareResources(
) → Future< void> - If an enhancement requires resources to function, they can be prepared here and this function will be run once only at runtime during the initialisation step.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited