Polygon<R extends Object> class

flutter_map's Polygon, plus nativeParams. Per backend:

  • pattern, strokeCap, strokeJoin: natively the stroke is dashed or dotted (Google strokePattern, MapKit lineDashPattern), joined as asked (Google strokeJointType, MapKit lineJoin); caps only show at dash ends (MapKit lineCap, Google draws them butt).
  • disableHolesBorder: drawn by composition natively (the polygon without stroke plus its outer ring as a line).
  • label: natively a marker showing the rasterised text (labelStyle) at labelPosition, hidden while the polygon is narrower on screen than the label (checked when the camera settles); rotateLabel true keeps it upright, false turns it with the map, as flutter_map.
Annotations

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, NativePolygonParams? nativeParams})
const

Properties

borderColor → Color
final
borderStrokeWidth → double
final
boundingBox → LatLngBounds
no setter
color → Color?
final
disableHolesBorder → bool
final
hashCode → int
The hash code for this object.
no setteroverride
hitValue → R?
final
holePointsList → List<List<LatLng>>?
final
label → String?
final
labelPlacement → PolygonLabelPlacement
final
labelPlacementCalculator → PolygonLabelPlacementCalculator
no setter
labelPosition → LatLng
no setter
labelStyle → TextStyle
final
nativeParams → NativePolygonParams?
Native-only settings; ignored by the flutter_map backend. Not in flutter_map.
final
pattern → StrokePattern
final
points → List<LatLng>
final
renderHashCode → int
no setter
rotateLabel → bool
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
strokeCap → StrokeCap
final
strokeJoin → StrokeJoin
final
textPainter → TextPainter?
The laid out label in labelStyle, or null without a label.
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