create static method
Animation
create({
- bool schemeUtilsIsSetDefaultData = false,
- String special_type = "animation",
- String special_return_type = "animation",
- num? duration,
- num? width,
- num? height,
- String? file_name,
- String? mime_type,
- bool? has_stickers,
- Minithumbnail? minithumbnail,
- Thumbnail? thumbnail,
- File? animation,
override
Generate By AZKADEV | Azka Axelion Gibran Script Dont edit by hand or anything manual
Implementation
static Animation create({
bool schemeUtilsIsSetDefaultData = false,
String special_type = "animation",
String special_return_type = "animation",
num? duration,
num? width,
num? height,
String? file_name,
String? mime_type,
bool? has_stickers,
Minithumbnail? minithumbnail,
Thumbnail? thumbnail,
File? animation,
}) {
// Animation animation = Animation({
final Map animation_data_create_json = {
"@type": special_type,
"@return_type": special_return_type,
"duration": duration,
"width": width,
"height": height,
"file_name": file_name,
"mime_type": mime_type,
"has_stickers": has_stickers,
"minithumbnail": (minithumbnail != null) ? minithumbnail.toJson() : null,
"thumbnail": (thumbnail != null) ? thumbnail.toJson() : null,
"animation": (animation != null) ? animation.toJson() : null,
};
animation_data_create_json.removeWhere((key, value) => value == null);
if (schemeUtilsIsSetDefaultData) {
defaultData.forEach((key, value) {
if (animation_data_create_json.containsKey(key) == false) {
animation_data_create_json[key] = value;
}
});
}
return Animation(animation_data_create_json);
}