copyWith method
ForumTopic
copyWith({
- ForumTopicInfo? info,
- Message? lastMessage()?,
- bool? isPinned,
- int? unreadCount,
- int? lastReadInboxMessageId,
- int? lastReadOutboxMessageId,
- int? unreadMentionCount,
- int? unreadReactionCount,
- ChatNotificationSettings? notificationSettings,
- DraftMessage? draftMessage()?,
- dynamic extra,
- int? clientId,
Returns a copy with the given fields replaced. For a nullable
field pass a function, e.g. field: () => null to clear it.
Implementation
ForumTopic copyWith({
ForumTopicInfo? info,
Message? Function()? lastMessage,
bool? isPinned,
int? unreadCount,
int? lastReadInboxMessageId,
int? lastReadOutboxMessageId,
int? unreadMentionCount,
int? unreadReactionCount,
ChatNotificationSettings? notificationSettings,
DraftMessage? Function()? draftMessage,
dynamic extra,
int? clientId,
}) =>
ForumTopic(
info: info ?? this.info,
lastMessage: lastMessage != null ? lastMessage() : this.lastMessage,
isPinned: isPinned ?? this.isPinned,
unreadCount: unreadCount ?? this.unreadCount,
lastReadInboxMessageId:
lastReadInboxMessageId ?? this.lastReadInboxMessageId,
lastReadOutboxMessageId:
lastReadOutboxMessageId ?? this.lastReadOutboxMessageId,
unreadMentionCount: unreadMentionCount ?? this.unreadMentionCount,
unreadReactionCount: unreadReactionCount ?? this.unreadReactionCount,
notificationSettings: notificationSettings ?? this.notificationSettings,
draftMessage: draftMessage != null ? draftMessage() : this.draftMessage,
extra: extra ?? this.extra,
clientId: clientId ?? this.clientId,
);