create static method
Sticker
create({
- bool schemeUtilsIsSetDefaultData = false,
- String special_type = "sticker",
- String special_return_type = "sticker",
- num? id,
- num? set_id,
- num? width,
- num? height,
- String? emoji,
- StickerFormat? format,
- StickerFullType? full_type,
- Thumbnail? thumbnail,
- File? sticker,
override
Generate By AZKADEV | Azka Axelion Gibran Script Dont edit by hand or anything manual
Implementation
static Sticker create({
bool schemeUtilsIsSetDefaultData = false,
String special_type = "sticker",
String special_return_type = "sticker",
num? id,
num? set_id,
num? width,
num? height,
String? emoji,
StickerFormat? format,
StickerFullType? full_type,
Thumbnail? thumbnail,
File? sticker,
}) {
// Sticker sticker = Sticker({
final Map sticker_data_create_json = {
"@type": special_type,
"@return_type": special_return_type,
"id": id,
"set_id": set_id,
"width": width,
"height": height,
"emoji": emoji,
"format": (format != null) ? format.toJson() : null,
"full_type": (full_type != null) ? full_type.toJson() : null,
"thumbnail": (thumbnail != null) ? thumbnail.toJson() : null,
"sticker": (sticker != null) ? sticker.toJson() : null,
};
sticker_data_create_json.removeWhere((key, value) => value == null);
if (schemeUtilsIsSetDefaultData) {
defaultData.forEach((key, value) {
if (sticker_data_create_json.containsKey(key) == false) {
sticker_data_create_json[key] = value;
}
});
}
return Sticker(sticker_data_create_json);
}