shiftBottomLeftOf method

Rect shiftBottomLeftOf(
  1. Rect outer
)

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

Implementation

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

  final offset = outer.bottomLeft.translate(0, -size.height);
  return offset & size;
}