toRect method

Rect toRect (
  1. Rect container
)

Convert this RelativeRect to a Rect, in the coordinate space of the container.

See also:

  • toSize, which returns the size part of the rect, based on the size of the container.

Implementation

Rect toRect(Rect container) {
  return Rect.fromLTRB(left, top, container.width - right, container.height - bottom);
}