copyWith method
Implementation
CanvasObject<T> copyWith({
double? dx,
double? dy,
double? width,
double? height,
T? child,
}) {
return CanvasObject<T>(
dx: dx ?? _dx,
dy: dy ?? _dy,
width: width ?? _width,
height: height ?? _height,
child: child ?? _child,
);
}