create static method
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,
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);
}