setQueue method

Future<bool> setQueue (
  1. {List<String> songIDs,
  2. int startIndex: 0}
)

Set the queue by giving the songIDs desired to be added to the queue. Does not require the play function to be called after setting the queue. It will autoplay

Implementation

Future<bool> setQueue({List<String> songIDs, int startIndex = 0}) async {
  if(Platform.isIOS){
    try{
      var result = await playerChannel.invokeMethod('setQueue', <String, dynamic>{
        "songIDs": songIDs,
        "startIndex": startIndex
      });
      return result;
    } catch(e){
      print(e);
      return false;
    }
  }
}