Rect.fromSize constructor

  1. @literal
const Rect.fromSize(
  1. int width,
  2. int height
)

Creates a new rectangle of width and height with a default origin.

If either width or height is negative, they are clamped to zero.

Implementation

@literal
const Rect.fromSize(
  int width,
  int height,
) : this.fromLTWH(0, 0, width, height);