shift method

RelativeRect shift (Offset offset)

Returns a new rectangle object translated by the given offset.

Implementation

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