Polygon.fromPoints constructor

Polygon.fromPoints({
  1. BBox? bbox,
  2. required List<List<Point>> points,
})

Implementation

Polygon.fromPoints({BBox? bbox, required List<List<Point>> points})
    : assert(points.expand((list) => list).length >= 3),
      super.withType(
          points.map((e) => e.map((e) => e.coordinates).toList()).toList(),
          GeoJSONObjectType.polygon,
          bbox: bbox);