copyWith method

  1. @override
DrawingTool copyWith({
  1. String? id,
  2. Color? color,
  3. double? strokeWidth,
  4. bool? isVisible,
  5. DrawingToolState? state,
})

Implementation

@override
DrawingTool copyWith({
  String? id,
  Color? color,
  double? strokeWidth,
  bool? isVisible,
  DrawingToolState? state,
}) {
  return HorizontalRayTool(
    id: id ?? this.id,
    yPosition: yPosition,
    centerX: centerX,
    priceValue: priceValue,
    color: color ?? this.color,
    strokeWidth: strokeWidth ?? this.strokeWidth,
  )
    ..isVisible = isVisible ?? this.isVisible
    ..state = state ?? this.state;
}