copyWith method

DownloadProgress copyWith({
  1. int? downloaded,
  2. int? total,
  3. double? progress,
  4. DownloadStatus? status,
  5. String? error,
  6. String? filePath,
})

Implementation

DownloadProgress copyWith({
  int? downloaded,
  int? total,
  double? progress,
  DownloadStatus? status,
  String? error,
  String? filePath,
}) {
  return DownloadProgress(
    downloaded: downloaded ?? this.downloaded,
    total: total ?? this.total,
    progress: progress ?? this.progress,
    status: status ?? this.status,
    error: error ?? this.error,
    filePath: filePath ?? this.filePath,
  );
}