create static method

VideoNote create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "videoNote",
  3. String special_return_type = "videoNote",
  4. num? duration,
  5. String? waveform,
  6. num? length,
  7. Minithumbnail? minithumbnail,
  8. Thumbnail? thumbnail,
  9. SpeechRecognitionResult? speech_recognition_result,
  10. File? video,
})
override

Generate By AZKADEV | Azka Axelion Gibran Script Dont edit by hand or anything manual

Implementation

static VideoNote create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "videoNote",
  String special_return_type = "videoNote",
  num? duration,
  String? waveform,
  num? length,
  Minithumbnail? minithumbnail,
  Thumbnail? thumbnail,
  SpeechRecognitionResult? speech_recognition_result,
  File? video,
}) {
  // VideoNote videoNote = VideoNote({
  final Map videoNote_data_create_json = {
    "@type": special_type,
    "@return_type": special_return_type,
    "duration": duration,
    "waveform": waveform,
    "length": length,
    "minithumbnail": (minithumbnail != null) ? minithumbnail.toJson() : null,
    "thumbnail": (thumbnail != null) ? thumbnail.toJson() : null,
    "speech_recognition_result": (speech_recognition_result != null) ? speech_recognition_result.toJson() : null,
    "video": (video != null) ? video.toJson() : null,
  };

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

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