dispose method

Future<void> dispose()

Dispose the controller and cleanup

Implementation

Future<void> dispose() async {
  await _eventSubscription?.cancel();
  await _stateController.close();
  await _trackController.close();
  await _queueController.close();
  await _repeatController.close();
  _queue.clear();
  _history.clear();
}