saveToDownloads static method

Future<String?> saveToDownloads({
  1. required String sourcePath,
  2. required String fileName,
  3. String? mimeType,
  4. String? subfolder,
})

Android: copies sourcePath into the public Downloads collection through MediaStore (or the legacy public directory below API 29). Returns the resulting content URI.

Implementation

static Future<String?> saveToDownloads({
  required String sourcePath,
  required String fileName,
  String? mimeType,
  String? subfolder,
}) => _call<String>("saveToDownloads", <String, Object?>{
  "sourcePath": sourcePath,
  "fileName": fileName,
  "mimeType": mimeType,
  "subfolder": subfolder,
});