seekToPosition method
Seeks to the given position in the currently playing track.
Implementation
Future<void> seekToPosition(Duration position, {String? deviceId}) async {
final uri = Uri.https(
_baseApiHost,
'/v1/me/player/seek',
{
'position_ms': position.inMilliseconds.toString(),
if (deviceId != null) 'device_id': deviceId,
},
);
await _putJson(uri);
}