Dictionary class

A dictionary that can be imported into the application, encapsulating its metadata and current preferences.

Annotations

Constructors

Dictionary({required String name, required String formatKey, required int order, List<String> hiddenLanguages = const [], List<String> collapsedLanguages = const []})
Initialise a dictionary with details determined from import.

Properties

collapsedLanguages List<String>
Languages where this dictionary is collapsed. If a language has set this dictionary to hidden, then its language code will be here.
read / write
entries IsarLinks<DictionaryEntry>
A dictionary may have multiple entries.
final
formatKey String
The unique key for the format that the dictionary was sourced from.
final
frequencies IsarLinks<DictionaryFrequency>
A dictionary may have multiple frequency entries.
final
hashCode int
The hash code for this object.
read-onlyoverride
hiddenLanguages List<String>
Languages where this dictionary is hidden. If a language has set this dictionary to hidden, then its language code will be here.
read / write
id Id
Identifier for database purposes.
read-only
name String
The name of the dictionary. For example, this could be 'Merriam-Webster Dictionary' or '大辞林' or 'JMdict'.
final
order int
The order of this dictionary in terms of user sorting, relative to other dictionaries.
read / write
pitches IsarLinks<DictionaryPitch>
A dictionary may have multiple pitch entries.
final
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
tags IsarLinks<DictionaryTag>
A dictionary may have multiple tags.
final

Methods

getBasePath({required String appDirDocPath}) String
Returns the resource path for within the applications documents directory.
getResourcePath({required String appDirDocPath, required String resourceBasename}) String
Given an asset name, returns an appropriate path to place the asset within this dictionary's resource path.
isCollapsed(Language language) bool
Whether this dictionary is collapsed for a given language.
isHidden(Language language) bool
Whether this dictionary is hidden for a given language.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

hash({required String name}) int
Function to generate a lookup ID for heading by its unique string key.
override