AudioExportField class

A special kind of field that has a special widget at the top of the creator. For example, the audio field has a media player that can be controlled based on its values.

Inheritance
Implementers

Constructors

AudioExportField({required String uniqueKey, required String label, required String description, required IconData icon})
Initialise this field with the predetermined and hardset values.

Properties

currentSearchTerm String?
The current search term for the image.
read-only
description String
A longer description of the field that will be used as its placeholder message.
finalinherited
descriptionLocalisation Map<String, String>
Localisations for this enhancement, where the key is a locale tag and the value is the description of the enhancement. If the value for the current locale is non-null, it will be used instead of description.
finalinherited
exportFile File?
The image file selected for export.
read-only
hashCode int
The hash code for this object.
read-onlyinherited
icon IconData
An icon that will show the enhancement if activated by the user in the quick menu.
finalinherited
isSearching bool
Whether or not searching is in progress.
read-only
label String
Name of the field that very shortly describes what it does.
finalinherited
labelLocalisation Map<String, String>
Localisations for this enhancement, where the key is a locale tag and the value is the label of the enhancement. If the value for the current locale is non-null, it will be used instead of label.
finalinherited
maxLines int?
Depends on whether this is multiline or not.
read-onlyinherited
multiline bool
Controls whether this field is multiline or not.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
showWidget bool
Whether or not to show the top widget.
read-only
uniqueKey String
A unique name that allows distinguishing this type from others, particularly for the purposes of differentiating between persistent settings keys.
finalinherited

Methods

buildTopWidget({required BuildContext context, required WidgetRef ref, required AppModel appModel, required CreatorModel creatorModel, required Orientation orientation}) Widget
Media fields are special and have a Widget that is shown at the top of the Card Creator.
clearFieldState({required CreatorModel creatorModel}) → void
Clears this field's data. The state refresh afterwards is not performed here and should be performed by the invocation of the clear field button.
getLocalisedDescription(AppModel appModel) String
Get the best localisation for the description of this enhancement. If there is no localisation, the fallback is description.
inherited
getLocalisedLabel(AppModel appModel) String
Get the best localisation for the label of this enhancement. If there is no localisation, the fallback is label.
inherited
getSearchTermWithFallback({required AppModel appModel, required CreatorModel creatorModel, required List<Field> fallbackSearchTerms}) String?
Fetches the search term to use from the CreatorModel. If the field controller is empty, use a fallback and inform the user that a fallback has been used.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onCreatorClose() → void
Executed on close of the creator screen.
onCreatorOpenAction({required BuildContext context, required WidgetRef ref, required AppModel appModel, required CreatorModel creatorModel, required DictionaryHeading heading, required bool creatorJustLaunched, required String? dictionaryName}) String?
Return the value that this field must have upon opening the Card Creator. For example, the Sentence field must provide the current context or the sentence that is stored in the app state, while the Image field may be used to return a snapshot of the current app context.
inherited
setAudio({required AppModel appModel, required CreatorModel creatorModel, required Future<File?> generateAudio(), required bool newAutoCannotOverride, required EnhancementTriggerCause cause, String? searchTerm}) Future<void>
Perform a function that generates a list of images and attempt a search with a given search term.
setAudioFile({required AppModel appModel, required CreatorModel creatorModel, required File file, String? searchTermUsed}) → void
Takes a new file as the audio file.
setSearching({required AppModel appModel, required CreatorModel creatorModel, required bool isSearching, String? searchTerm}) → void
Flag for showing the loading state of the picker.
toString() String
A string representation of this object.
inherited

Operators

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