toPolyline<T extends Object> method
- PolylineProperties<
T> ? polylineProperties,
Converts a list coords of a Polyline into a Polyline
Implementation
Polyline<T> toPolyline<T extends Object>({
PolylineProperties<T>? polylineProperties,
}) {
PolylineProperties<T> poly = polylineProperties ?? PolylineProperties<T>();
Polyline<T> polyline = Polyline<T>(
points: toLatLng(),
colorsStop: poly.colorsStop,
gradientColors: poly.gradientColors,
strokeWidth: poly.strokeWidth,
useStrokeWidthInMeter: poly.useStrokeWidthInMeter,
color: poly.color,
borderColor: poly.borderColor,
borderStrokeWidth: poly.borderStrokeWidth,
pattern: poly.isDotted,
strokeCap: poly.strokeCap,
strokeJoin: poly.strokeJoin,
hitValue: poly.hintValue,
);
// consoleLog(polyline.area(), color: 35);
return polyline;
}