copyWith method

Document copyWith({
  1. String? id,
  2. String? pageContent,
  3. Map<String, dynamic>? metadata,
})

Creates a copy of the document.

Implementation

Document copyWith({
  final String? id,
  final String? pageContent,
  final Map<String, dynamic>? metadata,
}) {
  return Document(
    id: id ?? this.id,
    pageContent: pageContent ?? this.pageContent,
    metadata: metadata ?? this.metadata,
  );
}