updatePolyline method

Future<void> updatePolyline(
  1. Line line,
  2. PolylineOptions changes
)

Updates the specified line with the given changes. The line must be a current member of the lines set.‚

Change listeners are notified once the line has been updated on the platform side.

The returned Future completes once listeners have been notified.

Implementation

Future<void> updatePolyline(Line line, PolylineOptions changes) async {
  line.options = line.options.copyWith(changes);
  await polylineManager!.set(line);
  notifyListeners();
}