DownloadItem constructor
DownloadItem({
- required String id,
- required String fileName,
- required String fileUrl,
- double progress = 0,
- DownloadStatus status = DownloadStatus.queued,
- String? localPath,
- double speedKBps = 0,
- double etaSeconds = 0,
- int downloadedBytes = 0,
- int totalBytes = 0,
- CancelToken? cancelToken,
- String? bgTaskId,
- int? downloadId,
- String? reportName,
- String? statusName,
- String? createdOn,
- String? updatedOn,
- 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,
});