create static method

InputMessageAnimation create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "inputMessageAnimation",
  3. String special_return_type = "inputMessageContent",
  4. InputFile? animation,
  5. InputThumbnail? thumbnail,
  6. List<num>? added_sticker_file_ids,
  7. num? duration,
  8. num? width,
  9. num? height,
  10. FormattedText? caption,
  11. bool? show_caption_above_media,
  12. bool? has_spoiler,
})
override

Generate By General Universe Script Dont edit by hand or anything manual

Implementation

static InputMessageAnimation create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "inputMessageAnimation",
  String special_return_type = "inputMessageContent",
  InputFile? animation,
  InputThumbnail? thumbnail,
  List<num>? added_sticker_file_ids,
  num? duration,
  num? width,
  num? height,
  FormattedText? caption,
  bool? show_caption_above_media,
  bool? has_spoiler,
}) {
  // InputMessageAnimation inputMessageAnimation = InputMessageAnimation({
  final Map inputMessageAnimation_data_create_json = {
    "@type": special_type,
    "@return_type": special_return_type,
    "animation": (animation != null) ? animation.toJson() : null,
    "thumbnail": (thumbnail != null) ? thumbnail.toJson() : null,
    "added_sticker_file_ids": added_sticker_file_ids,
    "duration": duration,
    "width": width,
    "height": height,
    "caption": (caption != null) ? caption.toJson() : null,
    "show_caption_above_media": show_caption_above_media,
    "has_spoiler": has_spoiler,
  };

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

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