Returns a new rect with the same origin but different size.
size
Rect resize(Size size) => Rect(x, y, size.width, size.height);