create static method
DraftMessage
create({
- bool schemeUtilsIsSetDefaultData = false,
- String special_type = "draftMessage",
- String special_return_type = "draftMessage",
- InputMessageReplyTo? reply_to,
- num? date,
- InputMessageContent? input_message_text,
- num? effect_id,
override
Generate By AZKADEV | Azka Axelion Gibran Script Dont edit by hand or anything manual
Implementation
static DraftMessage create({
bool schemeUtilsIsSetDefaultData = false,
String special_type = "draftMessage",
String special_return_type = "draftMessage",
InputMessageReplyTo? reply_to,
num? date,
InputMessageContent? input_message_text,
num? effect_id,
}) {
// DraftMessage draftMessage = DraftMessage({
final Map draftMessage_data_create_json = {
"@type": special_type,
"@return_type": special_return_type,
"reply_to": (reply_to != null) ? reply_to.toJson() : null,
"date": date,
"input_message_text": (input_message_text != null) ? input_message_text.toJson() : null,
"effect_id": effect_id,
};
draftMessage_data_create_json.removeWhere((key, value) => value == null);
if (schemeUtilsIsSetDefaultData) {
defaultData.forEach((key, value) {
if (draftMessage_data_create_json.containsKey(key) == false) {
draftMessage_data_create_json[key] = value;
}
});
}
return DraftMessage(draftMessage_data_create_json);
}