playlist property

  1. @override
Future<List<String>> playlist

This function returns an array of the video IDs in the playlist as they are currently ordered. By default, this function will return video IDs in the order designated by the playlist owner.

However, if you have called the YoutubePlayerController.setShuffle to shuffle the playlist order, then the return value will reflect the shuffled order.

Implementation

@override
Future<List<String>> get playlist async {
  final playlist = await _evalWithResult('getPlaylist()');

  return List.from(jsonDecode(playlist));
}