renamePlaylist method

Future<bool> renamePlaylist(
  1. int playlistId,
  2. String newName, [
  3. bool? requestPermission
])

Used to rename a specific Playlist

Parameters:

  • requestPermission is used for request or no Android STORAGE PERMISSION
  • playlistId is used to check if Playlist exist.
  • newName is used to add a new name to a Playlist.

Important:

  • If requestPermission is null, will be set to false.

Implementation

Future<bool> renamePlaylist(
  int playlistId,
  String newName, [
  bool? requestPermission,
]) async {
  final bool resultRenamePl = await _channel.invokeMethod("renamePlaylist", {
    "renamePlaylist": _checkPermission(requestPermission),
    "playlistId": playlistId,
    "newPlName": newName
  });
  return resultRenamePl;
}