create static method

AddLocalMessage create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "addLocalMessage",
  3. String special_return_type = "message",
  4. bool? is_tdlib_method,
  5. num? chat_id,
  6. MessageSender? sender_id,
  7. InputMessageReplyTo? reply_to,
  8. bool? disable_notification,
  9. InputMessageContent? input_message_content,
})
override

Generate By AZKADEV | Azka Axelion Gibran Script Dont edit by hand or anything manual

Implementation

static AddLocalMessage create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "addLocalMessage",
  String special_return_type = "message",
  bool? is_tdlib_method,
  num? chat_id,
  MessageSender? sender_id,
  InputMessageReplyTo? reply_to,
  bool? disable_notification,
  InputMessageContent? input_message_content,
}) {
  // AddLocalMessage addLocalMessage = AddLocalMessage({
  final Map addLocalMessage_data_create_json = {
    "@type": special_type,
    "@return_type": special_return_type,
    "is_tdlib_method": is_tdlib_method,
    "chat_id": chat_id,
    "sender_id": (sender_id != null) ? sender_id.toJson() : null,
    "reply_to": (reply_to != null) ? reply_to.toJson() : null,
    "disable_notification": disable_notification,
    "input_message_content": (input_message_content != null) ? input_message_content.toJson() : null,
  };

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

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