create static method

UpdateChatLastMessage create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "updateChatLastMessage",
  3. String special_return_type = "update",
  4. num? chat_id,
  5. Message? last_message,
  6. List<ChatPosition>? positions,
})
override

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

Implementation

static UpdateChatLastMessage create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "updateChatLastMessage",
  String special_return_type = "update",
  num? chat_id,
  Message? last_message,
  List<ChatPosition>? positions,
}) {
  // UpdateChatLastMessage updateChatLastMessage = UpdateChatLastMessage({
  final Map updateChatLastMessage_data_create_json = {
    "@type": special_type,
    "@return_type": special_return_type,
    "chat_id": chat_id,
    "last_message": (last_message != null) ? last_message.toJson() : null,
    "positions": (positions != null) ? positions.toJson() : null,
  };

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

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