copyWith method

CircleAnnotation copyWith({
  1. String? id,
  2. List<double>? bbox,
  3. String? createdAt,
  4. int? pageIndex,
  5. Color? strokeColor,
  6. double? strokeWidth,
  7. Color? fillColor,
  8. BorderStyle? borderStyle,
  9. List<double>? borderDashArray,
  10. double? cloudyBorderIntensity,
  11. List<double>? cloudyBorderInset,
  12. String? creatorName,
  13. double? opacity,
  14. int? pdfObjectId,
  15. List<AnnotationFlag>? flags,
  16. String? updatedAt,
  17. String? name,
  18. String? subject,
  19. bool? hidden,
  20. String? note,
  21. MeasurementScale? measurementScale,
  22. MeasurementPrecision? measurementPrecision,
  23. List<double>? measurementBBox,
})

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

Implementation

CircleAnnotation copyWith({
  String? id,
  List<double>? bbox,
  String? createdAt,
  int? pageIndex,
  Color? strokeColor,
  double? strokeWidth,
  Color? fillColor,
  BorderStyle? borderStyle,
  List<double>? borderDashArray,
  double? cloudyBorderIntensity,
  List<double>? cloudyBorderInset,
  String? creatorName,
  double? opacity,
  int? pdfObjectId,
  List<AnnotationFlag>? flags,
  String? updatedAt,
  String? name,
  String? subject,
  bool? hidden,
  String? note,
  MeasurementScale? measurementScale,
  MeasurementPrecision? measurementPrecision,
  List<double>? measurementBBox,
}) {
  return CircleAnnotation(
    id: id ?? this.id,
    bbox: bbox ?? this.bbox,
    createdAt: createdAt ?? this.createdAt,
    pageIndex: pageIndex ?? this.pageIndex,
    strokeColor: strokeColor ?? this.strokeColor,
    strokeWidth: strokeWidth ?? this.strokeWidth,
    fillColor: fillColor ?? this.fillColor,
    borderStyle: borderStyle ?? this.borderStyle,
    borderDashArray: borderDashArray ?? this.borderDashArray,
    cloudyBorderIntensity:
        cloudyBorderIntensity ?? this.cloudyBorderIntensity,
    cloudyBorderInset: cloudyBorderInset ?? this.cloudyBorderInset,
    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,
    note: note ?? this.note,
    measurementScale: measurementScale ?? this.measurementScale,
    measurementPrecision: measurementPrecision ?? this.measurementPrecision,
    measurementBBox: measurementBBox ?? this.measurementBBox,
  );
}