shuffle method
Toggle Shuffle For User's Playback.
Use state
to toggle the shuffle. true
to turn shuffle on and false
to turn it off respectively.
retrievePlaybackState
is optional. If true, the current playback state
will be retrieved after setting the volume. Defaults to true.
Implementation
Future<PlaybackState?> shuffle(bool state,
{String? deviceId, bool retrievePlaybackState = true}) async {
await _api._put('$_path/shuffle?${_buildQuery({
'state': state,
'deviceId': deviceId
})}');
return retrievePlaybackState ? playbackState() : null;
}