type_definitions library

Import the type_definitions library to use types defined in the dictosaurus package.

  • DictionaryCallback - an asynchronous callback that returns the properties of a term from a dictionary provider or API.
  • TermExpander - an asynchronous callback that returns an expansion of a term from an asynchronous provider or API. Also includes all the type definitions from the text_analysis/ type_definitions library.

Typedefs

DictionaryCallback = Future<DictionaryEntry?> Function(String term)
Function definition of an asynchronous callback that returns the properties of a term from a dictionary provider or API.
TermExpander = Future<Set<String>> Function(String term, [PartOfSpeech? partOfSpeech])
Function definition of an asynchronous callback that returns an expansion of a term from an asynchronous provider or API.
TranslationCallback = Future<Set<TermVariant>> Function(String term, Language sourceLanguage, Language targetLanguage)
Returns translations for term from sourceLanguage to targetLanguage as a collection of TermVariants.