setQueue method
Set the queue by giving the songIDs
desired to be added to the queue.
If startPlaying
is false, the queue will not autoplay.
If startID
is provided, the queue will start from the song with
the id startID
.
Implementation
Future<void> setQueue({
required List<String> songIDs,
required String startID,
bool startPlaying = true,
}) async {
if (!songIDs.contains(startID)) {
throw PlatformException(
code: 'Incorrect Arguments!',
message: 'songIDs must contain startID if provided.');
}
await playerChannel.invokeMethod('setQueue', <String, dynamic>{
'songIDs': songIDs,
'startPlaying': startPlaying,
'startID': startID
});
}