versionInfo abstract method

Future<VersionInfoResponse> versionInfo()

Returns metadata about the configuration of the Duolingo service.

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 cachedVersionInfo.

Example:

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

 final versionInfoResponse = await duolingo.versionInfo();
 final ttsVoiceConfiguration = versionInfoResponse.ttsVoiceConfiguration;

 for (final voiceDirection in ttsVoiceConfiguration.voiceDirections) {
   print(voiceDirection.language);
   print(voiceDirection.voice);
 }
}

Implementation

Future<VersionInfoResponse> versionInfo();