LayoutRect.fromLTRB constructor

const LayoutRect.fromLTRB(
  1. double left,
  2. double top,
  3. double right,
  4. double bottom,
)

Creates a rectangle from left, top, right, and bottom coordinates.

The width and height are calculated as right - left and bottom - top.

Implementation

const LayoutRect.fromLTRB(this.left, this.top, double right, double bottom)
  : width = right - left,
    height = bottom - top;