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