playAtIndex method
Play at Specific Index
Safely clamps out-of-range calls (ignored).
Implementation
Future<void> playAtIndex(int index) async {
if (_currentPlaylist.isEmpty || index < 0 || index >= _currentPlaylist.length) return;
_index = index;
_persistIfDefault();
await play(_currentPlaylist[_index]);
}