MediaField 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

Constructors

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

Properties

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
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
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
uniqueKey String
A unique name that allows distinguishing this type from others, particularly for the purposes of differentiating between persistent settings keys.
finalinherited

Methods

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
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
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
toString() String
A string representation of this object.
inherited

Operators

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