Field class

An entity that represents a broad characteristic of an item being exported that is distinguishable enough to deserve its own core functionality and family of user extensions. For example, a field could handle exclusively images, or dictionary definitions.

Implementers

Constructors

Field({required String uniqueKey, required String label, required String description, required IconData icon, bool multiline = true})
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.
final
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.
final
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.
final
label String
Name of the field that very shortly describes what it does.
final
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.
final
maxLines int?
Depends on whether this is multiline or not.
read-only
multiline bool
Controls whether this field is multiline or not.
final
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.
final

Methods

getLocalisedDescription(AppModel appModel) String
Get the best localisation for the description of this enhancement. If there is no localisation, the fallback is description.
getLocalisedLabel(AppModel appModel) String
Get the best localisation for the label of this enhancement. If there is no localisation, the fallback is label.
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.
toString() String
A string representation of this object.
inherited

Operators

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