playPrevious method
Play previous track from history
Implementation
Future<void> playPrevious() async {
if (_history.isEmpty) {
LavalinkLogger.warning('No previous track in history', tag: 'Player');
return;
}
if (_currentTrack != null) {
_queue.insert(0, _currentTrack!);
_queueController.add(List.from(_queue));
}
final previousTrack = _history.removeLast();
await play(previousTrack);
}