copyWith method
ForwardMessages
copyWith({
- int? chatId,
- MessageTopic? topicId()?,
- int? fromChatId,
- List<
int> ? messageIds, - MessageSendOptions? options()?,
- bool? sendCopy,
- bool? removeCaption,
Returns a copy with the given fields replaced. For a nullable
field pass a function, e.g. field: () => null to clear it.
Implementation
ForwardMessages copyWith({
int? chatId,
MessageTopic? Function()? topicId,
int? fromChatId,
List<int>? messageIds,
MessageSendOptions? Function()? options,
bool? sendCopy,
bool? removeCaption,
}) => ForwardMessages(
chatId: chatId ?? this.chatId,
topicId: topicId != null ? topicId() : this.topicId,
fromChatId: fromChatId ?? this.fromChatId,
messageIds: messageIds ?? this.messageIds,
options: options != null ? options() : this.options,
sendCopy: sendCopy ?? this.sendCopy,
removeCaption: removeCaption ?? this.removeCaption,
);