Rect.fromLTWH constructor

Rect.fromLTWH(double left, double top, double width, double height)

Construct a rectangle from its left and top edges, its width, and its height.

To construct a Rect from an Offset and a Size, you can use the rectangle constructor operator &. See Offset.&.

Implementation

Rect.fromLTWH(double left, double top, double width, double height) {
  _value
    ..[0] = left
    ..[1] = top
    ..[2] = left + width
    ..[3] = top + height;
}