DownloadProgress constructor

DownloadProgress({
  1. String? modelId,
  2. DownloadStage? stage,
  3. Int64? bytesDownloaded,
  4. Int64? totalBytes,
  5. double? stageProgress,
  6. double? overallSpeedBps,
  7. Int64? etaSeconds,
  8. DownloadState? state,
  9. int? retryAttempt,
  10. String? errorMessage,
  11. String? taskId,
  12. int? currentFileIndex,
  13. int? totalFiles,
  14. String? storageKey,
  15. String? localPath,
  16. double? overallProgress,
  17. Int64? startedAtUnixMs,
  18. Int64? updatedAtUnixMs,
  19. String? currentFileName,
  20. String? resumeToken,
})

Implementation

factory DownloadProgress({
  $core.String? modelId,
  DownloadStage? stage,
  $fixnum.Int64? bytesDownloaded,
  $fixnum.Int64? totalBytes,
  $core.double? stageProgress,
  $core.double? overallSpeedBps,
  $fixnum.Int64? etaSeconds,
  DownloadState? state,
  $core.int? retryAttempt,
  $core.String? errorMessage,
  $core.String? taskId,
  $core.int? currentFileIndex,
  $core.int? totalFiles,
  $core.String? storageKey,
  $core.String? localPath,
  $core.double? overallProgress,
  $fixnum.Int64? startedAtUnixMs,
  $fixnum.Int64? updatedAtUnixMs,
  $core.String? currentFileName,
  $core.String? resumeToken,
}) {
  final result = create();
  if (modelId != null) result.modelId = modelId;
  if (stage != null) result.stage = stage;
  if (bytesDownloaded != null) result.bytesDownloaded = bytesDownloaded;
  if (totalBytes != null) result.totalBytes = totalBytes;
  if (stageProgress != null) result.stageProgress = stageProgress;
  if (overallSpeedBps != null) result.overallSpeedBps = overallSpeedBps;
  if (etaSeconds != null) result.etaSeconds = etaSeconds;
  if (state != null) result.state = state;
  if (retryAttempt != null) result.retryAttempt = retryAttempt;
  if (errorMessage != null) result.errorMessage = errorMessage;
  if (taskId != null) result.taskId = taskId;
  if (currentFileIndex != null) result.currentFileIndex = currentFileIndex;
  if (totalFiles != null) result.totalFiles = totalFiles;
  if (storageKey != null) result.storageKey = storageKey;
  if (localPath != null) result.localPath = localPath;
  if (overallProgress != null) result.overallProgress = overallProgress;
  if (startedAtUnixMs != null) result.startedAtUnixMs = startedAtUnixMs;
  if (updatedAtUnixMs != null) result.updatedAtUnixMs = updatedAtUnixMs;
  if (currentFileName != null) result.currentFileName = currentFileName;
  if (resumeToken != null) result.resumeToken = resumeToken;
  return result;
}