copyWith method

  1. @override
UpdateForumTopic copyWith({
  1. int? chatId,
  2. int? forumTopicId,
  3. bool? isPinned,
  4. int? lastReadInboxMessageId,
  5. int? lastReadOutboxMessageId,
  6. int? unreadMentionCount,
  7. int? unreadReactionCount,
  8. int? unreadPollVoteCount,
  9. ChatNotificationSettings? notificationSettings,
  10. DraftMessage? draftMessage()?,
  11. dynamic extra,
  12. int? clientId,
})
override

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

Implementation

@override
UpdateForumTopic copyWith({
  int? chatId,
  int? forumTopicId,
  bool? isPinned,
  int? lastReadInboxMessageId,
  int? lastReadOutboxMessageId,
  int? unreadMentionCount,
  int? unreadReactionCount,
  int? unreadPollVoteCount,
  ChatNotificationSettings? notificationSettings,
  DraftMessage? Function()? draftMessage,
  dynamic extra,
  int? clientId,
}) => UpdateForumTopic(
  chatId: chatId ?? this.chatId,
  forumTopicId: forumTopicId ?? this.forumTopicId,
  isPinned: isPinned ?? this.isPinned,
  lastReadInboxMessageId:
      lastReadInboxMessageId ?? this.lastReadInboxMessageId,
  lastReadOutboxMessageId:
      lastReadOutboxMessageId ?? this.lastReadOutboxMessageId,
  unreadMentionCount: unreadMentionCount ?? this.unreadMentionCount,
  unreadReactionCount: unreadReactionCount ?? this.unreadReactionCount,
  unreadPollVoteCount: unreadPollVoteCount ?? this.unreadPollVoteCount,
  notificationSettings: notificationSettings ?? this.notificationSettings,
  draftMessage: draftMessage != null ? draftMessage() : this.draftMessage,
  extra: extra ?? this.extra,
  clientId: clientId ?? this.clientId,
);