closeCopy method

Producer closeCopy()

Closes the Producer and return new Instance of same Producer.

Implementation

Producer closeCopy() {
  if (closed) return this;

  _logger.debug('closeCopy()');

  // closed = true;

  _destroyTrack();

  emit('@close');

  // Emit observer event.
  observer.safeEmit('close');

  return copyWith(closed: true);
}