positionRect method

void positionRect(
  1. Rect rect, [
  2. Alignment alignment = Alignment.center
])

Position a child inside a Rect with an Alignment, this should only be called after BoxyChild.layout.

See also:

Implementation

void positionRect(Rect rect, [Alignment alignment = Alignment.center]) {
  position(alignment.inscribe(size, rect).topLeft);
}