updateLine method

Future<void> updateLine(
  1. Line line,
  2. LineOptions 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> updateLine(Line line, LineOptions changes) async {
  assert(_lines[line.id] == line);
  await _mapboxGlPlatform.updateLine(line, changes);
  line.options = line.options.copyWith(changes);
  notifyListeners();
}