moveTrackInPlaylist method
Moves a track within the playlist from one index to another.
Throws PlaylistException if operation fails.
Implementation
@override
Future<void> moveTrackInPlaylist(int fromIndex, int toIndex) async {
final Playlist? playlist = _currentPlaylist;
final PlaylistService? playlistService = _playlistService;
if (playlist != null && playlistService != null) {
final Playlist updatedPlaylist = await playlistService
.reorderPlaylistTracks(playlist.id, fromIndex, toIndex);
await loadPlaylist(updatedPlaylist);
}
}