copyWith method

Vector2Rect copyWith({
  1. Vector2? position,
  2. Vector2? size,
})

Implementation

Vector2Rect copyWith({
  Vector2? position,
  Vector2? size,
}) {
  return Vector2Rect(
    position ?? this.position,
    size ?? this.size,
  );
}