moveInQueue method

void moveInQueue(
  1. int from,
  2. int to
)

Move track from one position to another

Implementation

void moveInQueue(int from, int to) {
  if (from < 0 || from >= _queue.length || to < 0 || to >= _queue.length) return;
  final track = _queue.removeAt(from);
  _queue.insert(to, track);
  _queueController.add(List.from(_queue));
  LavalinkLogger.info('Moved track from $from to $to', tag: 'Player');
}