copyWith method

Bounds copyWith({
  1. double? x,
  2. double? y,
  3. double? width,
  4. double? height,
})

Creates a copy with updated values.

Implementation

Bounds copyWith({
  double? x,
  double? y,
  double? width,
  double? height,
}) {
  return Bounds(
    x: x ?? this.x,
    y: y ?? this.y,
    width: width ?? this.width,
    height: height ?? this.height,
  );
}