create static method

UpdateChatDraftMessage create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "updateChatDraftMessage",
  3. String special_return_type = "update",
  4. num? chat_id,
  5. DraftMessage? draft_message,
  6. List<ChatPosition>? positions,
})
override

Generate By General Universe Script Dont edit by hand or anything manual

Implementation

static UpdateChatDraftMessage create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "updateChatDraftMessage",
  String special_return_type = "update",
  num? chat_id,
  DraftMessage? draft_message,
  List<ChatPosition>? positions,
}) {
  // UpdateChatDraftMessage updateChatDraftMessage = UpdateChatDraftMessage({
  final Map updateChatDraftMessage_data_create_json = {
    "@type": special_type,
    "@return_type": special_return_type,
    "chat_id": chat_id,
    "draft_message": (draft_message != null) ? draft_message.toJson() : null,
    "positions": (positions != null) ? positions.toJson() : null,
  };

  updateChatDraftMessage_data_create_json.removeWhere((key, value) => value == null);

  if (schemeUtilsIsSetDefaultData) {
    defaultData.forEach((key, value) {
      if (updateChatDraftMessage_data_create_json.containsKey(key) == false) {
        updateChatDraftMessage_data_create_json[key] = value;
      }
    });
  }
  return UpdateChatDraftMessage(updateChatDraftMessage_data_create_json);
}