copyWith method

Type3DAnnotation copyWith({
  1. String? id,
  2. List<double>? bbox,
  3. String? createdAt,
  4. int? pageIndex,
  5. String? source,
  6. String? poster,
  7. Map<String, dynamic>? viewSettings,
  8. String? creatorName,
  9. double? opacity,
  10. int? pdfObjectId,
  11. List<AnnotationFlag>? flags,
  12. String? updatedAt,
  13. String? name,
  14. String? subject,
  15. bool? hidden,
})

Creates a copy of this annotation with the given fields replaced with the new values

Implementation

Type3DAnnotation copyWith({
  String? id,
  List<double>? bbox,
  String? createdAt,
  int? pageIndex,
  String? source,
  String? poster,
  Map<String, dynamic>? viewSettings,
  String? creatorName,
  double? opacity,
  int? pdfObjectId,
  List<AnnotationFlag>? flags,
  String? updatedAt,
  String? name,
  String? subject,
  bool? hidden,
}) {
  return Type3DAnnotation(
    id: id ?? this.id,
    bbox: bbox ?? this.bbox,
    createdAt: createdAt ?? this.createdAt,
    pageIndex: pageIndex ?? this.pageIndex,
    source: source ?? this.source,
    poster: poster ?? this.poster,
    viewSettings: viewSettings ?? this.viewSettings,
    creatorName: creatorName ?? this.creatorName,
    opacity: opacity ?? this.opacity,
    pdfObjectId: pdfObjectId ?? this.pdfObjectId,
    flags: flags ?? this.flags,
    updatedAt: updatedAt ?? AnnotationExtensions._currentTimestamp(),
    name: name ?? this.name,
    subject: subject ?? this.subject,
    hidden: hidden ?? this.hidden,
  );
}