toDrawable method
PolygonLayerOptions
toDrawable({
- Color? fillColor,
- Color borderColor = const Color(0x00000000),
- double borderStrokeWidth = 3.0,
- bool isDotted = false,
- String? label,
- TextStyle labelStyle = const TextStyle(),
- PolygonLabelPlacement labelPlacement = PolygonLabelPlacement.polylabel,
override
Create a drawable area for a FlutterMap
out of this region
Returns a PolygonLayerOptions
to be added to the layer
property of a FlutterMap
.
Implementation
@override
PolygonLayerOptions toDrawable({
Color? fillColor,
Color borderColor = const Color(0x00000000),
double borderStrokeWidth = 3.0,
bool isDotted = false,
String? label,
TextStyle labelStyle = const TextStyle(),
PolygonLabelPlacement labelPlacement = PolygonLabelPlacement.polylabel,
}) =>
PolygonLayerOptions(
polygons: [
Polygon(
isFilled: fillColor != null,
color: fillColor ?? Colors.transparent,
borderColor: borderColor,
borderStrokeWidth: borderStrokeWidth,
isDotted: isDotted,
label: label,
labelStyle: labelStyle,
labelPlacement: labelPlacement,
points: toList(),
)
],
);