create static method

Video create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "video",
  3. String? url,
  4. String? mimetype,
  5. String? filesha256,
  6. String? filelength,
  7. num? seconds,
  8. String? mediakey,
  9. num? height,
  10. num? width,
  11. String? fileencsha256,
  12. String? directpath,
  13. String? mediakeytimestamp,
  14. String? jpegthumbnail,
  15. ContextInfo? contextinfo,
  16. String? streamingsidecar,
})
override

Generated

Implementation

static Video create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "video",
  String? url,
  String? mimetype,
  String? filesha256,
  String? filelength,
  num? seconds,
  String? mediakey,
  num? height,
  num? width,
  String? fileencsha256,
  String? directpath,
  String? mediakeytimestamp,
  String? jpegthumbnail,
  ContextInfo? contextinfo,
  String? streamingsidecar,
}) {
  // Video video = Video({
  final Map video_data_create_json = {
    "@type": special_type,
    "url": url,
    "mimetype": mimetype,
    "fileSha256": filesha256,
    "fileLength": filelength,
    "seconds": seconds,
    "mediaKey": mediakey,
    "height": height,
    "width": width,
    "fileEncSha256": fileencsha256,
    "directPath": directpath,
    "mediaKeyTimestamp": mediakeytimestamp,
    "jpegThumbnail": jpegthumbnail,
    "contextInfo": (contextinfo != null) ? contextinfo.toJson() : null,
    "streamingSidecar": streamingsidecar,
  };

  video_data_create_json.removeWhere((key, value) => value == null);

  if (schemeUtilsIsSetDefaultData) {
    defaultData.forEach((key, value) {
      if (video_data_create_json.containsKey(key) == false) {
        video_data_create_json[key] = value;
      }
    });
  }
  return Video(video_data_create_json);
}