shiftTopLeftOf method

Rect shiftTopLeftOf(
  1. Rect outer
)

Returns a new rectangle that is positioned within the top-left of the outer rectangle

Implementation

Rect shiftTopLeftOf(Rect outer) {
  assert(!size.isEmpty);
  assert(!outer.size.isEmpty);

  return outer.topLeft & size;
}