parsePolyLineToFMap function
Implementation
fmap.Polyline? parsePolyLineToFMap(PolyLineLayer polyLine) {
if (polyLine.points.length < 2) {
return null; // A polyline requires at least two points
}
return fmap.Polyline(
points: polyLine.points,
gradientColors: polyLine.gradientColors,
color: polyLine.color ?? Colors.blue,
strokeWidth: polyLine.width ?? 5,
);
}