cancelAll method

Future<void> cancelAll()

Implementation

Future<void> cancelAll() async {
  if (_listeners.isNotEmpty) {
    // Stop listening to all events
    logger.finer('${objectId} cancelling ${_listeners.length} listeners(s)');
    for (final listener in _listeners) {
      await listener.cancel();
    }
  }
}