copyWith method
Creates a copy with selected values replaced.
Implementation
CanvasImageObject copyWith({
String? id,
String? name,
CanvasPaint? paint,
double? rotation,
bool? locked,
bool? hidden,
String? src,
double? x,
double? y,
double? width,
double? height,
String? crossOrigin,
}) {
return CanvasImageObject(
id: id ?? this.id,
name: name ?? this.name,
paint: paint ?? this.paint,
rotation: rotation ?? this.rotation,
locked: locked ?? this.locked,
hidden: hidden ?? this.hidden,
src: src ?? this.src,
x: x ?? this.x,
y: y ?? this.y,
width: width ?? this.width,
height: height ?? this.height,
crossOrigin: crossOrigin ?? this.crossOrigin,
);
}