copyWith method

ShapeAnnotation copyWith({
  1. String? id,
  2. int? pageNumber,
  3. DateTime? createdAt,
  4. DateTime? modifiedAt,
  5. ShapeType? shapeType,
  6. Rect? bounds,
  7. Color? color,
  8. double? strokeWidth,
  9. bool? filled,
  10. Color? fillColor,
})

Implementation

ShapeAnnotation copyWith({
  String? id,
  int? pageNumber,
  DateTime? createdAt,
  DateTime? modifiedAt,
  ShapeType? shapeType,
  Rect? bounds,
  Color? color,
  double? strokeWidth,
  bool? filled,
  Color? fillColor,
}) {
  return ShapeAnnotation(
    id: id ?? this.id,
    pageNumber: pageNumber ?? this.pageNumber,
    createdAt: createdAt ?? this.createdAt,
    modifiedAt: modifiedAt ?? this.modifiedAt,
    shapeType: shapeType ?? this.shapeType,
    bounds: bounds ?? this.bounds,
    color: color ?? this.color,
    strokeWidth: strokeWidth ?? this.strokeWidth,
    filled: filled ?? this.filled,
    fillColor: fillColor ?? this.fillColor,
  );
}