createPlaylist method

Future<bool> createPlaylist(
  1. String playlistName, [
  2. bool? requestPermission
])

Used to create a Playlist

Parameters:

  • requestPermission is used for request or no Android STORAGE PERMISSION
  • playlistName is used to add a name to Playlist.

Important:

  • If requestPermission is null, will be set to false.
  • This method create a playlist using External Storage, all apps will be able to see this playlist

Implementation

Future<bool> createPlaylist(
  String playlistName, [
  bool? requestPermission,
]) async {
  final bool resultCreatePl = await _channel.invokeMethod("createPlaylist", {
    "requestPermission": _checkPermission(requestPermission),
    "playlistName": playlistName
  });
  return resultCreatePl;
}