DownloadTask constructor

DownloadTask({
  1. required int taskId,
  2. String accept = "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
  3. String userAgent = "Mozilla/5.0 (Android 7.0; Mobile; rv:54.0) Gecko/54.0 Firefox/54.0 AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.125 Mobile Safari/603.2.4",
  4. String referer = "",
  5. required String url,
  6. required Map<String, String> headers,
  7. required String downloadPath,
  8. dynamic data,
})

Implementation

DownloadTask({
  required this.taskId,
  this.accept =
      "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
  this.userAgent =
      "Mozilla/5.0 (Android 7.0; Mobile; rv:54.0) Gecko/54.0 Firefox/54.0 AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.125 Mobile Safari/603.2.4",
  this.referer = "",
  required this.url,
  required this.headers,
  required this.downloadPath,
  this.data,
});