updateSymbol method

Future<void> updateSymbol(
  1. Symbol symbol,
  2. SymbolOptions changes
)

Updates the specified symbol with the given changes. The symbol must be a current member of the symbols set.

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

The returned Future completes once listeners have been notified.

Implementation

Future<void> updateSymbol(Symbol symbol, SymbolOptions changes) async {
  assert(_symbols[symbol.id] == symbol);

  await _mapboxGlPlatform.updateSymbol(symbol, changes);
  symbol.options = symbol.options.copyWith(changes);
  notifyListeners();
}