Size.fromRadius constructor Null safety

const Size.fromRadius(
  1. double radius
)

Creates a square Size whose width and height are twice the given dimension.

This is a square that contains a circle with the given radius.

See also:

  • Size.square, which creates a square with the given dimension.

Implementation

const Size.fromRadius(double radius) : super(radius * 2.0, radius * 2.0);