wordHint abstract method

Future<WordHintResponse> wordHint(
  1. {String fromLanguage,
  2. String learningLanguage,
  3. required String sentence}

Returns the hint information of sentence specified in the argument.

For fromLanguage, specify the language of the hint information, and for learningLanguage, specify the language of the word or sentence specified in sentence.

A call to this method will always cause a communication process with the Duolingo API. If you want to reuse the cached response object, use cachedWordHint.


void main() async {
 final duolingo = Duolingo.instance;

 final authResponse = await duolingo.authenticate(
   username: 'test_username',
   password: 'test_password',

 final wordHintResponse = await duolingo.wordHint(
   fromLanguage: 'en',
   learningLanguage: 'es',
   sentence: 'bolĂ­grafos',

 for (final token in wordHintResponse.tokens) {
   final headers = token.table.headers;
   for (final header in headers) {

   final rows = token.table.rows;
   for (final row in rows) {
     for (final cell in row.cells) {


Future<WordHintResponse> wordHint({
  String fromLanguage,
  String learningLanguage,
  required String sentence,