unregisterSource method

int unregisterSource(
  1. String source
)

Unregister all hooks from a given source.

Implementation

int unregisterSource(String source) {
  var removed = 0;
  for (final chain in _chains.values) {
    removed += chain.removeBySource(source);
  }
  _registrationsById.removeWhere((_, r) => r.source == source);
  return removed;
}