addToQueue method

void addToQueue(
  1. Track track
)

Add track to queue

Implementation

void addToQueue(Track track) {
  _queue.add(track);
  _queueController.add(List.from(_queue));
  LavalinkLogger.info('Added to queue: ${track.info.title} (Position: ${_queue.length})', tag: 'Player');

  if (_currentTrack == null && _isStopped) {
    play(track);
  }
}