Circle constructor

Circle({
  1. required double radius,
  2. Point<num>? center,
})

Creates a Circle with the given radius and center.

Implementation

Circle({required this.radius, Point<num>? center})
    : _center = center ?? const Point(x: 0, y: 0) {
  if (radius < 0) {
    throw ArgumentError('Radius cannot be negative');
  }
}