create static method
Sticker
create({
- bool schemeUtilsIsSetDefaultData = false,
- String special_type = "sticker",
- String? url,
- String? filesha256,
- String? fileencsha256,
- String? mediakey,
- String? mimetype,
- num? height,
- num? width,
- String? directpath,
- String? filelength,
- String? mediakeytimestamp,
- bool? isanimated,
- ContextInfo? contextinfo,
- String? stickersentts,
- bool? isavatar,
override
Generated
Implementation
static Sticker create({
bool schemeUtilsIsSetDefaultData = false,
String special_type = "sticker",
String? url,
String? filesha256,
String? fileencsha256,
String? mediakey,
String? mimetype,
num? height,
num? width,
String? directpath,
String? filelength,
String? mediakeytimestamp,
bool? isanimated,
ContextInfo? contextinfo,
String? stickersentts,
bool? isavatar,
}) {
// Sticker sticker = Sticker({
final Map sticker_data_create_json = {
"@type": special_type,
"url": url,
"fileSha256": filesha256,
"fileEncSha256": fileencsha256,
"mediaKey": mediakey,
"mimetype": mimetype,
"height": height,
"width": width,
"directPath": directpath,
"fileLength": filelength,
"mediaKeyTimestamp": mediakeytimestamp,
"isAnimated": isanimated,
"contextInfo": (contextinfo != null) ? contextinfo.toJson() : null,
"stickerSentTs": stickersentts,
"isAvatar": isavatar,
};
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);
}