AudioSelector.fromJson constructor
AudioSelector.fromJson(
- Map<String, dynamic> json
)
Implementation
factory AudioSelector.fromJson(Map<String, dynamic> json) {
return AudioSelector(
customLanguageCode: json['customLanguageCode'] as String?,
defaultSelection:
(json['defaultSelection'] as String?)?.toAudioDefaultSelection(),
externalAudioFileInput: json['externalAudioFileInput'] as String?,
languageCode: (json['languageCode'] as String?)?.toLanguageCode(),
offset: json['offset'] as int?,
pids:
(json['pids'] as List?)?.whereNotNull().map((e) => e as int).toList(),
programSelection: json['programSelection'] as int?,
remixSettings: json['remixSettings'] != null
? RemixSettings.fromJson(
json['remixSettings'] as Map<String, dynamic>)
: null,
selectorType: (json['selectorType'] as String?)?.toAudioSelectorType(),
tracks: (json['tracks'] as List?)
?.whereNotNull()
.map((e) => e as int)
.toList(),
);
}