DownloadTask.create constructor

DownloadTask.create({
  1. required int taskId,
  2. required String url,
  3. required String downloadPath,
  4. Map<String, String>? headers,
  5. dynamic data,
})

Implementation

factory DownloadTask.create({
  required int taskId,
  required String url,
  required String downloadPath,
  Map<String, String>? headers,
  dynamic data,
}) {
  return DownloadTask(
    taskId: taskId,
    url: url,
    downloadPath: downloadPath,
    headers: headers ?? <String, String>{},
    data: data,
  );
}