copyWith method

ChartDrawing copyWith({
  1. String? id,
  2. DrawingTool? tool,
  3. List<DrawingPoint>? points,
  4. Color? color,
  5. double? strokeWidth,
  6. bool? isLocked,
  7. bool? isSelected,
  8. Map<String, dynamic>? properties,
  9. String? label,
})

Implementation

ChartDrawing copyWith({
  String? id,
  DrawingTool? tool,
  List<DrawingPoint>? points,
  Color? color,
  double? strokeWidth,
  bool? isLocked,
  bool? isSelected,
  Map<String, dynamic>? properties,
  String? label,
}) {
  return ChartDrawing(
    id: id ?? this.id,
    tool: tool ?? this.tool,
    points: points ?? this.points,
    color: color ?? this.color,
    strokeWidth: strokeWidth ?? this.strokeWidth,
    isLocked: isLocked ?? this.isLocked,
    isSelected: isSelected ?? this.isSelected,
    properties: properties ?? this.properties,
    label: label ?? this.label,
  );
}