Polygon constructor

Polygon({
  1. required List<LatLng> points,
  2. List<List<LatLng>>? holePointsList,
  3. Color color = const Color(0xFF00FF00),
  4. double borderStrokeWidth = 0.0,
  5. Color borderColor = const Color(0xFFFFFF00),
  6. bool disableHolesBorder = false,
  7. bool isDotted = false,
  8. bool isFilled = false,
  9. StrokeCap strokeCap = StrokeCap.round,
  10. StrokeJoin strokeJoin = StrokeJoin.round,
  11. String? label,
  12. TextStyle labelStyle = const TextStyle(),
  13. PolygonLabelPlacement labelPlacement = PolygonLabelPlacement.centroid,
})

Implementation

Polygon({
  required this.points,
  this.holePointsList,
  this.color = const Color(0xFF00FF00),
  this.borderStrokeWidth = 0.0,
  this.borderColor = const Color(0xFFFFFF00),
  this.disableHolesBorder = false,
  this.isDotted = false,
  this.isFilled = false,
  this.strokeCap = StrokeCap.round,
  this.strokeJoin = StrokeJoin.round,
  this.label,
  this.labelStyle = const TextStyle(),
  this.labelPlacement = PolygonLabelPlacement.centroid,
}) : holeOffsetsList = null == holePointsList || holePointsList.isEmpty
          ? null
          : List.generate(holePointsList.length, (_) => []);