DownloadTask constructor
DownloadTask({
- required int taskId,
- String accept = "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
- 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",
- String referer = "",
- required String url,
- required Map<
String, String> headers, - required String downloadPath,
- 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,
});