updatePolyline method
Implementation
Future<void> updatePolyline({
required String polylineId,
List<OlaLatLng>? points,
String? color,
double? width,
String? lineType,
}) async {
try {
final args = <String, dynamic>{'polylineId': polylineId};
if (points != null) {
args['points'] = points.map((p) => p.toJson()).toList();
}
if (color != null) args['color'] = color;
if (width != null) args['width'] = width;
if (lineType != null) args['lineType'] = lineType;
await _invoke('updatePolyline', args);
} catch (e) {
debugPrint('Error updating polyline: $e');
}
}