create static method

return original data json

Implementation

static YoutubeVideoManifest create({
  String? special_type,
  List<YoutubeVideoManifestAudio>? audios,
  List<YoutubeVideoManifestVideo>? videos,
  List<YoutubeVideoManifestMuxed>? muxeds,
  List<YoutubeVideoManifestStream>? streams,
}) {
  YoutubeVideoManifest youtubeVideoManifest = YoutubeVideoManifest({
    "@type": special_type,
    "audios": (audios != null)
        ? audios.map((res) => res.toJson()).toList().cast<Map>()
        : null,
    "videos": (videos != null)
        ? videos.map((res) => res.toJson()).toList().cast<Map>()
        : null,
    "muxeds": (muxeds != null)
        ? muxeds.map((res) => res.toJson()).toList().cast<Map>()
        : null,
    "streams": (streams != null)
        ? streams.map((res) => res.toJson()).toList().cast<Map>()
        : null,
  });

  return youtubeVideoManifest;
}