ModelEvent constructor

ModelEvent({
  1. ModelEventKind? kind,
  2. String? modelId,
  3. String? taskId,
  4. double? progress,
  5. Int64? bytesDownloaded,
  6. Int64? totalBytes,
  7. String? downloadState,
  8. String? localPath,
  9. String? error,
  10. int? modelCount,
  11. String? customModelName,
  12. String? customModelUrl,
  13. String? modelName,
  14. Int64? modelSizeBytes,
  15. Int64? durationMs,
  16. int? framework,
})

Implementation

factory ModelEvent({
  ModelEventKind? kind,
  $core.String? modelId,
  $core.String? taskId,
  $core.double? progress,
  $fixnum.Int64? bytesDownloaded,
  $fixnum.Int64? totalBytes,
  $core.String? downloadState,
  $core.String? localPath,
  $core.String? error,
  $core.int? modelCount,
  $core.String? customModelName,
  $core.String? customModelUrl,
  $core.String? modelName,
  $fixnum.Int64? modelSizeBytes,
  $fixnum.Int64? durationMs,
  $core.int? framework,
}) {
  final result = create();
  if (kind != null) result.kind = kind;
  if (modelId != null) result.modelId = modelId;
  if (taskId != null) result.taskId = taskId;
  if (progress != null) result.progress = progress;
  if (bytesDownloaded != null) result.bytesDownloaded = bytesDownloaded;
  if (totalBytes != null) result.totalBytes = totalBytes;
  if (downloadState != null) result.downloadState = downloadState;
  if (localPath != null) result.localPath = localPath;
  if (error != null) result.error = error;
  if (modelCount != null) result.modelCount = modelCount;
  if (customModelName != null) result.customModelName = customModelName;
  if (customModelUrl != null) result.customModelUrl = customModelUrl;
  if (modelName != null) result.modelName = modelName;
  if (modelSizeBytes != null) result.modelSizeBytes = modelSizeBytes;
  if (durationMs != null) result.durationMs = durationMs;
  if (framework != null) result.framework = framework;
  return result;
}