updateBezierCurve method
Update bezier curve properties
Implementation
Future<void> updateBezierCurve({
required String curveId,
OlaLatLng? startPoint,
OlaLatLng? endPoint,
String? color,
String? lineType,
double? width,
}) async {
try {
final args = <String, dynamic>{'curveId': curveId};
if (startPoint != null) {
args['startLatitude'] = startPoint.latitude;
args['startLongitude'] = startPoint.longitude;
}
if (endPoint != null) {
args['endLatitude'] = endPoint.latitude;
args['endLongitude'] = endPoint.longitude;
}
if (color != null) {
args['color'] = color;
}
if (lineType != null) {
args['lineType'] = lineType;
}
if (width != null) {
args['width'] = width;
}
await _channel.invokeMethod('updateBezierCurve', args);
} catch (e) {
debugPrint('Error updating bezier curve: $e');
}
}