lastSelectedDictionaryFormat property

DictionaryFormat lastSelectedDictionaryFormat

Get the target language from persisted preferences.

Implementation

DictionaryFormat get lastSelectedDictionaryFormat {
  String firstDictionaryFormatName = dictionaryFormats.values.first.uniqueKey;
  String lastDictionaryFormatName = _preferences.get(
    'last_selected_dictionary_format',
    defaultValue: firstDictionaryFormatName,
  );

  return dictionaryFormats[lastDictionaryFormatName]!;
}