Rect.fromPoints constructor

Rect.fromPoints(
  1. Point topLeft,
  2. Point bottomRight
)

Create from two Points.

Implementation

factory Rect.fromPoints(Point topLeft, Point bottomRight) =>
    Rect(topLeft.x, topLeft.y, bottomRight.x, bottomRight.y);