ImageExportField 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
- Mixed in types
- Implementers
Constructors
- ImageExportField({required String uniqueKey, required String label, required String description, required IconData icon})
- Initialise this field with the predetermined and hardset values.
Properties
- carouselKey ↔ UniqueKey
-
For setting carousel item position.
read / write
- carouselNotifier ↔ ChangeNotifier
-
For setting carousel item position.
read / write
-
currentImageSuggestions
→ List<
NetworkToFileImage> ? -
The images shown in a carousel for selection.
read-only
- 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 → NetworkToFileImage?
-
The image file selected for export.
read-only
- 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-only
- 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
- selectedIndex → int?
-
Selected index for currentImageSuggestions.
read-only
- 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
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
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.
-
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.
-
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.
inherited
-
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< generateImages(), required EnhancementTriggerCause cause, required bool newAutoCannotOverride, String? searchTerm}) → Future<NetworkToFileImage> >void> - Perform a function that generates a list of images and attempt a search with a given search term.
-
setSearching(
{required AppModel appModel, required CreatorModel creatorModel, required bool isSearching, String? searchTerm}) → void - Flag for showing the loading state of the picker.
-
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
. -
setSelectedSearchSuggestion(
{required int index}) → void - Change the index of the selected search suggestion and update the state of the image picker.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited