moveItemTo method

Future<bool> moveItemTo(
  1. int playlistId,
  2. int from,
  3. int to, [
  4. bool? requestPermission,
])

Used to change song/audio position from a specific Playlist

Parameters:

  • requestPermission is used for request or no Android STORAGE PERMISSION
  • playlistId is used to check if Playlist exist.
  • from is the old position from a audio/song.
  • to is the new position from a audio/song.

Important:

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

Implementation

Future<bool> moveItemTo(
  int playlistId,
  int from,
  int to, [
  bool? requestPermission,
]) async {
  final bool resultMoveItem = await _channel.invokeMethod("moveItemTo", {
    "requestPermission": _checkPermission(requestPermission),
    "playlistId": playlistId,
    "from": from,
    "to": to
  });
  return resultMoveItem;
}