NeshanCircle constructor

const NeshanCircle({
  1. required String id,
  2. required LatLng center,
  3. double radius = 100.0,
  4. Color? fillColor,
  5. double fillOpacity = 0.3,
  6. Color? strokeColor,
  7. double strokeWidth = 2.0,
  8. double strokeOpacity = 1.0,
})

Creates a new circle.

id is a unique identifier for the circle. center is the center point of the circle. radius is the radius in meters (default: 100). fillColor is the color of the circle fill (default: blue with 0.3 opacity). fillOpacity is the opacity of the fill (0.0 to 1.0, default: 0.3). strokeColor is the color of the circle outline (default: black). strokeWidth is the width of the circle outline in pixels (default: 2). strokeOpacity is the opacity of the outline (0.0 to 1.0, default: 1.0).

Implementation

const NeshanCircle({
  required this.id,
  required this.center,
  this.radius = 100.0,
  this.fillColor,
  this.fillOpacity = 0.3,
  this.strokeColor,
  this.strokeWidth = 2.0,
  this.strokeOpacity = 1.0,
}) : assert(radius > 0.0, 'radius must be > 0.0'),
     assert(fillOpacity >= 0.0 && fillOpacity <= 1.0,
          'fillOpacity must be between 0.0 and 1.0'),
     assert(strokeOpacity >= 0.0 && strokeOpacity <= 1.0,
          'strokeOpacity must be between 0.0 and 1.0'),
     assert(strokeWidth >= 0.0, 'strokeWidth must be >= 0.0');