shift method

IntRect shift(
  1. IntOffset offset
)

Creates a new rectangle shifted by the specified amounts.

dx The amount to shift in the x direction. dy The amount to shift in the y direction. Returns a new IntRect with shifted coordinates.

Implementation

IntRect shift(final IntOffset offset) {
  return IntRect(left + offset.x, top + offset.y, width, height);
}