removeFills method

Future<void> removeFills(
  1. Iterable<Fill> fills
)

Removes the specified fills from the map. The fills must be current members of the fills set.

Change listeners are notified once the fills have been removed on the platform side.

The returned Future completes once listeners have been notified.

Implementation

Future<void> removeFills(Iterable<Fill> fills) async {
  final ids = fills.where((f) => _fills[f.id] == f).map((f) => f.id);
  assert(fills.length == ids.length);

  await _mapboxGlPlatform.removeFills(ids);
  ids.forEach((id) => _fills.remove(id));
  notifyListeners();
}