download method

Future<UDownloadTask> download(
  1. String url, {
  2. UDownloadDestination destination = const UDownloadDestination.downloads(),
  3. String? fileName,
  4. Map<String, String> headers = const <String, String>{},
  5. bool wifiOnly = false,
  6. int? connections,
  7. UChecksum? checksum,
})

Convenience for the common case: download url to destination with default settings.

Implementation

Future<UDownloadTask> download(
  String url, {
  UDownloadDestination destination = const UDownloadDestination.downloads(),
  String? fileName,
  Map<String, String> headers = const <String, String>{},
  bool wifiOnly = false,
  int? connections,
  UChecksum? checksum,
}) => enqueue(UDownloadRequest(url: url, destination: destination, fileName: fileName, headers: headers, wifiOnly: wifiOnly, connections: connections, checksum: checksum));