androidMoveAssetsToPath method

Future<bool> androidMoveAssetsToPath(
  1. List<String> assetIds,
  2. String targetPath
)
inherited

Move multiple assets to a different path/album on Android 11+ (API 30+) with user permission.

This method uses MediaStore.createWriteRequest() to request user permission for batch modifications, showing a single system dialog for all assets.

assetIds List of asset IDs to move targetPath Target RELATIVE_PATH (e.g., "Pictures/MyAlbum")

Returns true if the operation was successful, false otherwise.

Note: This method requires Android 11 (API 30) or higher. For Android 10 and below, use androidMoveAssetToPath instead.

Implementation

Future<bool> androidMoveAssetsToPath(
  List<String> assetIds,
  String targetPath,
) async {
  final result = await _channel.invokeMethod(
    PMConstants.mMoveAssetsToPath,
    <String, dynamic>{
      'assetIds': assetIds,
      'targetPath': targetPath,
    },
  );
  return result == true;
}