Polygon class

Represents a polygon on the map. A polygon is a closed shape consisting of a set of points, where line segments are drawn between consecutive points. The polygon can be styled with a fill color, stroke color, and alpha value. The polygon can also have holes, which are smaller polygons inside the main polygon.

Constructors

Polygon.new({int? id, required List<LatLng> points, List<List<LatLng>> holes = const [], Color? fillColor, Color? strokeColor, double? alpha})
Each polygon must have at least three points. Each hole must have at least three points.
Polygon.fromJson(Map<String, dynamic> json)
factory

Properties

alpha double?
final
fillColor Color?
final
hashCode int
The hash code for this object.
no setterinherited
holes List<List<LatLng>>
final
id int?
getter/setter pair
points List<LatLng>
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
strokeColor Color?
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited