copyWith method

CanvasObject<T> copyWith({
  1. double? dx,
  2. double? dy,
  3. double? width,
  4. double? height,
  5. T? child,
})

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,
  );
}