copyWith method

AddLocalMessage copyWith({
  1. int? chatId,
  2. MessageSender? senderId,
  3. MessageReplyTo? replyTo()?,
  4. bool? disableNotification,
  5. InputMessageContent? inputMessageContent,
})

Returns a copy with the given fields replaced. For a nullable field pass a function, e.g. field: () => null to clear it.

Implementation

AddLocalMessage copyWith({
  int? chatId,
  MessageSender? senderId,
  MessageReplyTo? Function()? replyTo,
  bool? disableNotification,
  InputMessageContent? inputMessageContent,
}) =>
    AddLocalMessage(
      chatId: chatId ?? this.chatId,
      senderId: senderId ?? this.senderId,
      replyTo: replyTo != null ? replyTo() : this.replyTo,
      disableNotification: disableNotification ?? this.disableNotification,
      inputMessageContent: inputMessageContent ?? this.inputMessageContent,
    );