toMarker method
Converts this shape into a drawable map Marker (a polyline, part 0).
The marker carries points in travel direction — add it to a MarkerCollection with your polyline render settings (use the line's PTRouteInfo.routeColor so map and list agree). Each call creates a new marker; reuse the result rather than converting repeatedly.
Returns
Implementation
Marker? toMarker() => points.isEmpty ? null : Marker.fromCoords(points);