Rect.fromCircle constructor

Rect.fromCircle(
  1. {Offset center,
  2. double radius}
)

Construct a rectangle that bounds the given circle.

The center argument is assumed to be an offset from the origin.

Implementation

Rect.fromCircle({ Offset center, double radius }) : this.fromCenter(
  center: center,
  width: radius * 2,
  height: radius * 2,
);