enqueue static method

Future<int> enqueue({
  1. required String downloadUrl,
  2. required String downloadPath,
  3. required String fileName,
  4. String description = "Downloading in progress",
  5. Map<String, String>? headers,
  6. bool allowScanningByMediaScanner = true,
  7. int notificationVisibility = NotificationVisibility.VISIBILITY_VISIBLE_NOTIFY_COMPLETED,
})

Implementation

static Future<int> enqueue({
  required String downloadUrl,
  required String downloadPath,
  required String fileName,
  String description = "Downloading in progress",
  Map<String, String>? headers,
  bool allowScanningByMediaScanner = true,
  int notificationVisibility =
      NotificationVisibility.VISIBILITY_VISIBLE_NOTIFY_COMPLETED,
}) async {
  return await _channel.invokeMethod("enqueue", {
    "downloadUrl": downloadUrl,
    "downloadPath": downloadPath,
    "description": description,
    "fileName": fileName,
    "headers": headers,
    "allow_scanning_by_media_scanner": allowScanningByMediaScanner,
    "notification_visibility": notificationVisibility,
  });
}