create static method
MessageAnimation
create({
- bool schemeUtilsIsSetDefaultData = false,
- String special_type = "messageAnimation",
- String special_return_type = "messageContent",
- Animation? animation,
- FormattedText? caption,
- bool? show_caption_above_media,
- bool? has_spoiler,
- bool? is_secret,
override
Generate By General Universe Script Dont edit by hand or anything manual
Implementation
static MessageAnimation create({
bool schemeUtilsIsSetDefaultData = false,
String special_type = "messageAnimation",
String special_return_type = "messageContent",
Animation? animation,
FormattedText? caption,
bool? show_caption_above_media,
bool? has_spoiler,
bool? is_secret,
}) {
// MessageAnimation messageAnimation = MessageAnimation({
final Map messageAnimation_data_create_json = {
"@type": special_type,
"@return_type": special_return_type,
"animation": (animation != null) ? animation.toJson() : null,
"caption": (caption != null) ? caption.toJson() : null,
"show_caption_above_media": show_caption_above_media,
"has_spoiler": has_spoiler,
"is_secret": is_secret,
};
messageAnimation_data_create_json.removeWhere((key, value) => value == null);
if (schemeUtilsIsSetDefaultData) {
defaultData.forEach((key, value) {
if (messageAnimation_data_create_json.containsKey(key) == false) {
messageAnimation_data_create_json[key] = value;
}
});
}
return MessageAnimation(messageAnimation_data_create_json);
}