copyWith method
Creates a copy with selected values replaced.
Implementation
CanvasLine copyWith({
String? id,
String? name,
CanvasPaint? paint,
double? rotation,
bool? locked,
bool? hidden,
double? x1,
double? y1,
double? x2,
double? y2,
}) {
return CanvasLine(
id: id ?? this.id,
name: name ?? this.name,
paint: paint ?? this.paint,
rotation: rotation ?? this.rotation,
locked: locked ?? this.locked,
hidden: hidden ?? this.hidden,
x1: x1 ?? this.x1,
y1: y1 ?? this.y1,
x2: x2 ?? this.x2,
y2: y2 ?? this.y2,
);
}