Voice.fromJson constructor
Implementation
factory Voice.fromJson(Map<String, dynamic> json) {
return Voice(
additionalLanguageCodes: (json['AdditionalLanguageCodes'] as List?)
?.whereNotNull()
.map((e) => (e as String).toLanguageCode())
.toList(),
gender: (json['Gender'] as String?)?.toGender(),
id: (json['Id'] as String?)?.toVoiceId(),
languageCode: (json['LanguageCode'] as String?)?.toLanguageCode(),
languageName: json['LanguageName'] as String?,
name: json['Name'] as String?,
supportedEngines: (json['SupportedEngines'] as List?)
?.whereNotNull()
.map((e) => (e as String).toEngine())
.toList(),
);
}