PresetSettings.fromJson constructor

PresetSettings.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory PresetSettings.fromJson(Map<String, dynamic> json) {
  return PresetSettings(
    audioDescriptions: (json['audioDescriptions'] as List?)
        ?.whereNotNull()
        .map((e) => AudioDescription.fromJson(e as Map<String, dynamic>))
        .toList(),
    captionDescriptions: (json['captionDescriptions'] as List?)
        ?.whereNotNull()
        .map((e) =>
            CaptionDescriptionPreset.fromJson(e as Map<String, dynamic>))
        .toList(),
    containerSettings: json['containerSettings'] != null
        ? ContainerSettings.fromJson(
            json['containerSettings'] as Map<String, dynamic>)
        : null,
    videoDescription: json['videoDescription'] != null
        ? VideoDescription.fromJson(
            json['videoDescription'] as Map<String, dynamic>)
        : null,
  );
}