ImageField class

Returns audio information from context.

Inheritance

Properties

carouselKey UniqueKey
For setting carousel item position.
read / writeinherited
carouselNotifier ChangeNotifier
For setting carousel item position.
read / writeinherited
currentImageSuggestions List<NetworkToFileImage>?
The images shown in a carousel for selection.
read-onlyinherited
currentSearchTerm String?
The current search term for the image.
read-onlyinherited
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 NetworkToFileImage?
The image file selected for export.
read-onlyinherited
hashCode int
The hash code for this object.
read-onlyinherited
hasListeners bool
Whether any listeners are currently registered.
read-onlyinherited
icon IconData
An icon that will show the enhancement if activated by the user in the quick menu.
finalinherited
indexNotifier ValueNotifier<int>
Notifier for updating the count.
read-onlyinherited
isSearching bool
Whether or not searching is in progress.
read-onlyinherited
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
selectedIndex int?
Selected index for currentImageSuggestions.
read-onlyinherited
showWidget bool
Whether or not to show the top widget.
read-onlyinherited
uniqueKey String
A unique name that allows distinguishing this type from others, particularly for the purposes of differentiating between persistent settings keys.
finalinherited

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
buildCarousel({required int itemCount, required AppModel appModel}) Widget
Build the image carousel.
buildFooterLoading({required BuildContext context, required AppModel appModel}) Widget
Get the footer under the carousel that returns the current image index.
buildFooterTextSpans({required BuildContext context, required AppModel appModel, required int itemCount}) Widget
Get the footer under the carousel that returns the current image index.
buildImage({required ImageProvider<Object> image, required BoxFit fit}) Widget
Build the given image and fade in to load if network.
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.
override
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.
inherited
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
inherited
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.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
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.
override
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
setImages({required AppModel appModel, required CreatorModel creatorModel, required Future<List<NetworkToFileImage>> generateImages(), required EnhancementTriggerCause cause, required bool newAutoCannotOverride, String? searchTerm}) Future<void>
Perform a function that generates a list of images and attempt a search with a given search term.
inherited
setSearching({required AppModel appModel, required CreatorModel creatorModel, required bool isSearching, String? searchTerm}) → void
Flag for showing the loading state of the picker.
inherited
setSearchSuggestions({required AppModel appModel, required CreatorModel creatorModel, required List<NetworkToFileImage> images, String? searchTermUsed, int newSelectedSuggestionIndex = 0}) → void
Takes a non-empty new list of images to set as the new image suggestions. By default, this replaces the exportFile with the index set in newSelectedSuggestionIndex.
inherited
setSelectedSearchSuggestion({required int index}) → void
Change the index of the selected search suggestion and update the state of the image picker.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

instance ImageField
Get the singleton instance of this field.
read-only

Constants

key → const String
The unique key for this field.
'image'