copyWith method
DrawingTool
copyWith({
- String? id,
- Color? color,
- double? strokeWidth,
- bool? isVisible,
- 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;
}