copyWith method

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

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

Implementation

SoundAnnotation copyWith({
  String? id,
  List<double>? bbox,
  String? createdAt,
  int? pageIndex,
  String? soundUrl,
  String? icon,
  String? creatorName,
  double? opacity,
  int? pdfObjectId,
  List<AnnotationFlag>? flags,
  String? updatedAt,
  String? name,
  String? subject,
  bool? hidden,
}) {
  return SoundAnnotation(
    id: id ?? this.id,
    bbox: bbox ?? this.bbox,
    createdAt: createdAt ?? this.createdAt,
    pageIndex: pageIndex ?? this.pageIndex,
    soundUrl: soundUrl ?? this.soundUrl,
    icon: icon ?? this.icon,
    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,
  );
}