toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  Map<String, dynamic> jsonObject = Map<String, dynamic>();
  if (appId != null) jsonObject.putIfAbsent("appId", () => appId);
  if (url != null) jsonObject.putIfAbsent("url", () => url);
  if (multiURLs != null) jsonObject.putIfAbsent("multiURLs", () => multiURLs);
  if (playDefaultIndex != null)
    jsonObject.putIfAbsent("playDefaultIndex", () => playDefaultIndex);
  if (videoId != null)
    jsonObject.putIfAbsent("videoId", () => videoId!.toJson());
  if (videoIdV2 != null)
    jsonObject.putIfAbsent("videoIdV2", () => videoIdV2!.toJson());
  if (title != null) jsonObject.putIfAbsent("title", () => title);

  return jsonObject;
}