Polygon class Null safety

Draws a polygon through geographical locations on the map.

Annotations

Constructors

Polygon({required PolygonId polygonId, bool consumeTapEvents = false, Color fillColor = Colors.black, List<LatLng> points = const <LatLng>[], Color strokeColor = Colors.black, int strokeWidth = 10, bool visible = true, VoidCallback? onTap})
Creates an immutable representation of a polygon through geographical locations on the map.
const

Properties

appleMapsPolygon Polygon
read-only
consumeTapEvents bool
True if the Polygon consumes tap events. [...]
final
fillColor Color
Fill color in ARGB format, the same format used by Color. The default value is black (0xff000000).
final
googleMapsPolygon Polygon
read-only
hashCode int
The hash code for this object. [...]
read-only, override
onTap VoidCallback?
Callbacks to receive tap events for polygon placed on this map.
final
points List<LatLng>
The vertices of the polygon to be drawn. [...]
final
polygonId PolygonId
Uniquely identifies a Polygon.
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
strokeColor Color
Line color in ARGB format, the same format used by Color. The default value is black (0xff000000).
final
strokeWidth int
Width of the polygon, used to define the width of the line to be drawn. [...]
final
visible bool
True if the marker is visible.
final

Methods

clone() Polygon
Creates a new Polygon object whose values are the same as this instance.
copyWith({bool? consumeTapEventsParam, List<LatLng>? pointsParam, Color? strokeColorParam, Color? fillColorParam, int? strokeWidthParam, bool? visibleParam, VoidCallback? onTapParam}) Polygon
Creates a new Polygon object whose values are the same as this instance, unless overwritten by the specified parameters.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
override

Static Methods

toAppleMapsPolygonSet(Set<Polygon> polygons) Set<Polygon>
toGoogleMapsPolygonSet(Set<Polygon> polygons) Set<Polygon>