VersionInfoResponse class

This class represents the response entity of the Version Info API of the Duolingo API.

This entity object contains a lot of metadata about the Duolingo service. For example, it contains ttsVoiceConfiguration, which is related to the voice data used for words, and supportedDirections, which is a mapping table between the language used for learning and the language being learned.

Example:

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

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

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

Constructors

VersionInfoResponse.from({required int statusCode, required String reasonPhrase, required Map<String, String> headers, required String ttsCdnUrl, required int ageRestrictionLimit, required String country, required String apiBaseUrl, required String speechHost, required String ttsBaseUrl, required String dictBaseUrl, required TtsVoiceConfiguration ttsVoiceConfiguration, required List<SupportedDirection> supportedDirections})
Returns the new instance of VersionInfoResponse based on arguments.

Properties

ageRestrictionLimit int
The age limit
final
apiBaseUrl String
The base url for API
final
country String
The country code
final
dictBaseUrl String
The base url of dict
final
hashCode int
The hash code for this object.
no setteroverride
headers Map<String, String>
The http headers
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
speechHost String
The host for speech
final
status Status
The http status
finalinherited
supportedDirections List<SupportedDirection>
The supported language directions
final
ttsBaseUrl String
The base url for TTS
final
ttsCdnUrl String
The CDN for TTS
final
ttsVoiceConfiguration TtsVoiceConfiguration
The TTS voice configuration
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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