Polygon<R extends Object> class
Polygon class, to be used for the PolygonLayer.
Constructors
-
Polygon({required List<
LatLng> points, List<List< ? holePointsList, Color? color, double borderStrokeWidth = 0, Color borderColor = const Color(0xFFFFFF00), bool disableHolesBorder = false, StrokePattern pattern = const StrokePattern.solid(), @Deprecated('Prefer setting `color` to null to disable filling, or a `Color` to enable filling of that color. ' 'This parameter will be removed to simplify the API, as this was a remnant of pre-null-safety. ' 'The default of this parameter is now `null` and will use the rules above - the option is retained so as not to break APIs. ' 'This feature was deprecated (and the default changed) after v7.') bool? isFilled, StrokeCap strokeCap = StrokeCap.round, StrokeJoin strokeJoin = StrokeJoin.round, String? label, TextStyle labelStyle = const TextStyle(), PolygonLabelPlacement labelPlacement = PolygonLabelPlacement.centroid, bool rotateLabel = false, R? hitValue})LatLng> > - 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 Polygon.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
- isFilled → bool?
-
DEPRECATED
final
- label → String?
-
The optional label of the Polygon.
final
- labelPlacement → PolygonLabelPlacement
-
The placement logic 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.