create static method
MessagePremiumGiftCode
create({
- bool schemeUtilsIsSetDefaultData = false,
- String special_type = "messagePremiumGiftCode",
- String special_return_type = "messageContent",
- MessageSender? creator_id,
- FormattedText? text,
- bool? is_from_giveaway,
- bool? is_unclaimed,
- String? currency,
- num? amount,
- String? cryptocurrency,
- num? cryptocurrency_amount,
- num? month_count,
- Sticker? sticker,
- String? code,
override
Generate By AZKADEV | Azka Axelion Gibran Script Dont edit by hand or anything manual
Implementation
static MessagePremiumGiftCode create({
bool schemeUtilsIsSetDefaultData = false,
String special_type = "messagePremiumGiftCode",
String special_return_type = "messageContent",
MessageSender? creator_id,
FormattedText? text,
bool? is_from_giveaway,
bool? is_unclaimed,
String? currency,
num? amount,
String? cryptocurrency,
num? cryptocurrency_amount,
num? month_count,
Sticker? sticker,
String? code,
}) {
// MessagePremiumGiftCode messagePremiumGiftCode = MessagePremiumGiftCode({
final Map messagePremiumGiftCode_data_create_json = {
"@type": special_type,
"@return_type": special_return_type,
"creator_id": (creator_id != null) ? creator_id.toJson() : null,
"text": (text != null) ? text.toJson() : null,
"is_from_giveaway": is_from_giveaway,
"is_unclaimed": is_unclaimed,
"currency": currency,
"amount": amount,
"cryptocurrency": cryptocurrency,
"cryptocurrency_amount": cryptocurrency_amount,
"month_count": month_count,
"sticker": (sticker != null) ? sticker.toJson() : null,
"code": code,
};
messagePremiumGiftCode_data_create_json.removeWhere((key, value) => value == null);
if (schemeUtilsIsSetDefaultData) {
defaultData.forEach((key, value) {
if (messagePremiumGiftCode_data_create_json.containsKey(key) == false) {
messagePremiumGiftCode_data_create_json[key] = value;
}
});
}
return MessagePremiumGiftCode(messagePremiumGiftCode_data_create_json);
}