close method

Future<void> close()

Closes the Consumer.

Implementation

Future<void> close() async {
  if (closed) return;

  _logger.debug('close()');

  closed = true;
  await _destroyTrack();
  emit('@close');
  // Emit observer event.
  observer.safeEmit('close');
}