copyWith method

EMChatThread 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. EMMessage? lastMessage}
)

Implementation

EMChatThread copyWith({
  String? threadId,
  String? threadName,
  String? owner,
  String? messageId,
  String? parentId,
  int? membersCount,
  int? messageCount,
  int? createAt,
  EMMessage? lastMessage,
}) {
  return EMChatThread._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,
  );
}