systemEnqueue static method

Future<bool> systemEnqueue({
  1. required String id,
  2. required String url,
  3. required Map<String, String> headers,
  4. required String fileName,
  5. String? path,
  6. String? title,
  7. String? mimeType,
  8. bool wifiOnly = false,
  9. bool publicDownloads = false,
  10. bool showNotification = true,
})

Hands a download to the OS. path is the final file path; with publicDownloads on Android the file goes to the shared Downloads collection instead and path is ignored.

Implementation

static Future<bool> systemEnqueue({
  required String id,
  required String url,
  required Map<String, String> headers,
  required String fileName,
  String? path,
  String? title,
  String? mimeType,
  bool wifiOnly = false,
  bool publicDownloads = false,
  bool showNotification = true,
}) async =>
    await _call<bool>("systemEnqueue", <String, Object?>{
      "id": id,
      "url": url,
      "headers": headers,
      "fileName": fileName,
      "path": path,
      "title": title,
      "mimeType": mimeType,
      "wifiOnly": wifiOnly,
      "publicDownloads": publicDownloads,
      "showNotification": showNotification,
    }) ??
    false;