DownloadEvent constructor

DownloadEvent({
  1. DownloadEventKind? kind,
  2. String? modelId,
  3. String? taskId,
  4. String? error,
  5. DownloadPlanResult? planResult,
  6. DownloadStartResult? startResult,
  7. DownloadProgress? progress,
  8. DownloadCancelResult? cancelResult,
  9. DownloadResumeResult? resumeResult,
})

Implementation

factory DownloadEvent({
  DownloadEventKind? kind,
  $core.String? modelId,
  $core.String? taskId,
  $core.String? error,
  $1.DownloadPlanResult? planResult,
  $1.DownloadStartResult? startResult,
  $1.DownloadProgress? progress,
  $1.DownloadCancelResult? cancelResult,
  $1.DownloadResumeResult? resumeResult,
}) {
  final result = create();
  if (kind != null) result.kind = kind;
  if (modelId != null) result.modelId = modelId;
  if (taskId != null) result.taskId = taskId;
  if (error != null) result.error = error;
  if (planResult != null) result.planResult = planResult;
  if (startResult != null) result.startResult = startResult;
  if (progress != null) result.progress = progress;
  if (cancelResult != null) result.cancelResult = cancelResult;
  if (resumeResult != null) result.resumeResult = resumeResult;
  return result;
}