create static method

InputMessageVideo create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "inputMessageVideo",
  3. String special_return_type = "inputMessageContent",
  4. InputFile? video,
  5. InputThumbnail? thumbnail,
  6. InputFile? cover,
  7. num? start_timestamp,
  8. List<num>? added_sticker_file_ids,
  9. num? duration,
  10. num? width,
  11. num? height,
  12. bool? supports_streaming,
  13. FormattedText? caption,
  14. bool? show_caption_above_media,
  15. MessageSelfDestructType? self_destruct_type,
  16. bool? has_spoiler,
})
override

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

Implementation

static InputMessageVideo create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "inputMessageVideo",
  String special_return_type = "inputMessageContent",
  InputFile? video,
  InputThumbnail? thumbnail,
  InputFile? cover,
  num? start_timestamp,
  List<num>? added_sticker_file_ids,
  num? duration,
  num? width,
  num? height,
  bool? supports_streaming,
  FormattedText? caption,
  bool? show_caption_above_media,
  MessageSelfDestructType? self_destruct_type,
  bool? has_spoiler,
}) {
  // InputMessageVideo inputMessageVideo = InputMessageVideo({
  final Map inputMessageVideo_data_create_json = {
    "@type": special_type,
    "@return_type": special_return_type,
    "video": (video != null) ? video.toJson() : null,
    "thumbnail": (thumbnail != null) ? thumbnail.toJson() : null,
    "cover": (cover != null) ? cover.toJson() : null,
    "start_timestamp": start_timestamp,
    "added_sticker_file_ids": added_sticker_file_ids,
    "duration": duration,
    "width": width,
    "height": height,
    "supports_streaming": supports_streaming,
    "caption": (caption != null) ? caption.toJson() : null,
    "show_caption_above_media": show_caption_above_media,
    "self_destruct_type": (self_destruct_type != null) ? self_destruct_type.toJson() : null,
    "has_spoiler": has_spoiler,
  };

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

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