shift method

Rect shift(
  1. Offset offset
)

Returns a new rectangle translated by the given offset.

To translate a rectangle by separate x and y components rather than by an Offset, consider translate.

Implementation

Rect shift(Offset offset) {
  return Rect.fromLTRB(left + offset.dx, top + offset.dy, right + offset.dx, bottom + offset.dy);
}