copyWith method

SessionAnnotation copyWith({
  1. String? id,
  2. int? pageIndex,
  3. String? elementId,
  4. Offset? position,
  5. String? content,
  6. String? author,
  7. DateTime? createdAt,
  8. AnnotationType? type,
})

Implementation

SessionAnnotation copyWith({
  String? id,
  int? pageIndex,
  String? elementId,
  Offset? position,
  String? content,
  String? author,
  DateTime? createdAt,
  AnnotationType? type,
}) {
  return SessionAnnotation(
    id: id ?? this.id,
    pageIndex: pageIndex ?? this.pageIndex,
    elementId: elementId ?? this.elementId,
    position: position ?? this.position,
    content: content ?? this.content,
    author: author ?? this.author,
    createdAt: createdAt ?? this.createdAt,
    type: type ?? this.type,
  );
}