DownloadProgress constructor

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

Implementation

factory DownloadProgress({
  $core.String? modelId,
  $fixnum.Int64? bytesDownloaded,
  $fixnum.Int64? totalBytes,
  $core.double? stageProgress,
  $core.double? bytesPerSecond,
  $fixnum.Int64? etaSeconds,
  DownloadState? state,
  $core.int? retryAttempt,
  $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,
  $0.SDKError? error,
}) {
  final result = create();
  if (modelId != null) result.modelId = modelId;
  if (bytesDownloaded != null) result.bytesDownloaded = bytesDownloaded;
  if (totalBytes != null) result.totalBytes = totalBytes;
  if (stageProgress != null) result.stageProgress = stageProgress;
  if (bytesPerSecond != null) result.bytesPerSecond = bytesPerSecond;
  if (etaSeconds != null) result.etaSeconds = etaSeconds;
  if (state != null) result.state = state;
  if (retryAttempt != null) result.retryAttempt = retryAttempt;
  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 (error != null) result.error = error;
  return result;
}