DownloadItem constructor

DownloadItem({
  1. required String id,
  2. required String fileName,
  3. required String fileUrl,
  4. double progress = 0,
  5. DownloadStatus status = DownloadStatus.queued,
  6. String? localPath,
  7. double speedKBps = 0,
  8. double etaSeconds = 0,
  9. int downloadedBytes = 0,
  10. int totalBytes = 0,
  11. CancelToken? cancelToken,
  12. String? bgTaskId,
  13. int? downloadId,
  14. String? reportName,
  15. String? statusName,
  16. String? createdOn,
  17. String? updatedOn,
  18. bool isActive = false,
})

Implementation

DownloadItem({
  required this.id,
  required this.fileName,
  required this.fileUrl,
  this.progress = 0,
  this.status = DownloadStatus.queued,
  this.localPath,
  this.speedKBps = 0,
  this.etaSeconds = 0,
  this.downloadedBytes = 0,
  this.totalBytes = 0,
  this.cancelToken,
  this.bgTaskId,

  // New API response fields
  this.downloadId,
  this.reportName,
  this.statusName,
  this.createdOn,
  this.updatedOn,
  this.isActive = false,
});