DictionaryModel class

Represents a complete dictionary entry for a word.

Contains the word, phonetic information, meanings grouped by part of speech, and license information.

Constructors

DictionaryModel({required String word, String? phonetic, List<PhoneticModel> phonetics = const [], List<MeaningModel> meanings = const [], LicenseModel? license, List<String> sourceUrls = const []})
Creates a DictionaryModel instance.
const
DictionaryModel.fromJson(Map<String, dynamic> json)
Creates a DictionaryModel from a JSON map.
factory

Properties

audioUrl String?
Returns the first available audio URL from phonetics.
no setter
displayPhonetic String?
Returns the best available phonetic text.
no setter
hasAudio bool
Whether this dictionary entry has audio available.
no setter
hashCode int
The hash code for this object.
no setteroverride
hasMeanings bool
Whether this dictionary entry has meanings.
no setter
license LicenseModel?
License information from the API source.
final
meanings List<MeaningModel>
Meanings grouped by part of speech.
final
phonetic String?
The primary phonetic transcription.
final
phonetics List<PhoneticModel>
List of all phonetic variations with audio URLs.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sourceUrls List<String>
URLs to the definition sources.
final
word String
The word that was looked up.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts this model to a JSON map.
toString() String
A string representation of this object.
override

Operators

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