Polygon<R extends Object> class

Polygon class, to be used for the PolygonLayer.

Constructors

Polygon({required List<LatLng> points, List<List<LatLng>>? holePointsList, Color? color, double borderStrokeWidth = 0, Color borderColor = const Color(0xFFFFFF00), bool disableHolesBorder = false, StrokePattern pattern = const StrokePattern.solid(), StrokeCap strokeCap = StrokeCap.round, StrokeJoin strokeJoin = StrokeJoin.round, String? label, TextStyle labelStyle = const TextStyle(), @Deprecated('Use `labelPlacementCalculator` with the equivalent calculator instead. ' 'Then, remove any arguments to this parameter and allow it to default. ' 'This enables more flexibility and extensibility. ' 'This was deprecated after v8.2.0, and will be removed in a future ' 'version.') PolygonLabelPlacement labelPlacement = PolygonLabelPlacement.centroid, PolygonLabelPlacementCalculator? labelPlacementCalculator, bool rotateLabel = false, R? hitValue})
Create a new Polygon instance by setting it's parameters.

Properties

borderColor → Color
The color of the Polygon outline.
final
borderStrokeWidth → double
The stroke width of the Polygon outline.
final
boundingBox → LatLngBounds
Get the bounding box of the points (cached).
no setter
color → Color?
The fill color of the Polygon.
final
disableHolesBorder → bool
Whether holes should have borders
final
hashCode → int
The hash code for this object.
no setteroverride
hitValue → R?
Value to notify layer's hitNotifier with (such as PolygonLayer.hitNotifier)
final
holePointsList → List<List<LatLng>>?
The point lists that define holes in the Polygon.
final
label → String?
The optional label of the Polygon.
final
labelPlacement → PolygonLabelPlacement
The placement logic of the Polygon.label
final
labelPlacementCalculator → PolygonLabelPlacementCalculator
The calculator to use to determine the position of the Polygon.label
final
labelPosition → LatLng
Get the coordinates of the label position (cached).
no setter
labelStyle → TextStyle
The TextStyle of the Polygon.label.
final
pattern → StrokePattern
Determines whether the border (if visible) should be solid, dotted, or dashed, and the exact characteristics of each
final
points → List<LatLng>
The points for the outline of the Polygon.
final
renderHashCode → int
An optimized hash code dedicated to be used inside the _PolygonPainter.
no setter
rotateLabel → bool
Whether to rotate the label counter to the camera's rotation, to ensure it remains upright
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
strokeCap → StrokeCap
Styles to use for line endings.
final
strokeJoin → StrokeJoin
Styles to use for line segment joins.
final
textPainter → TextPainter?
Get the TextPainter for the polygon label (cached).
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent 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

isClockwise(List<LatLng> points) → bool
Checks if the Polygon points are ordered clockwise in the list.