copyWith method

ChatThread copyWith({
  1. String? threadId,
  2. String? threadName,
  3. String? owner,
  4. String? messageId,
  5. String? parentId,
  6. int? membersCount,
  7. int? messageCount,
  8. int? createAt,
  9. ChatMessage? lastMessage,
})

Implementation

ChatThread copyWith({
  String? threadId,
  String? threadName,
  String? owner,
  String? messageId,
  String? parentId,
  int? membersCount,
  int? messageCount,
  int? createAt,
  ChatMessage? lastMessage,
}) {
  return ChatThread._private(
    threadId: threadId ?? this.threadId,
    threadName: threadName ?? this.threadName,
    owner: owner ?? this.owner,
    messageId: messageId ?? this.messageId,
    parentId: parentId ?? this.parentId,
    membersCount: membersCount ?? this.membersCount,
    messageCount: messageCount ?? this.messageCount,
    createAt: createAt ?? this.createAt,
    lastMessage: lastMessage ?? this.lastMessage,
  );
}