copyWith method

DownloadProgress copyWith({
  1. DownloadState? state,
  2. double? progress,
  3. String? filePath,
  4. String? error,
})

Implementation

DownloadProgress copyWith({
  DownloadState? state,
  double? progress,
  String? filePath,
  String? error,
}) {
  return DownloadProgress(
    state: state ?? this.state,
    progress: progress ?? this.progress,
    filePath: filePath ?? this.filePath,
    error: error ?? this.error,
  );
}