progress method

UfbtProgressTask progress(
  1. String title, {
  2. int? total,
  3. String? id,
  4. UfbtProgressThrottle? throttle,
})

Implementation

UfbtProgressTask progress(
  String title, {
  int? total,
  String? id,
  UfbtProgressThrottle? throttle,
}) {
  final task = UfbtProgressTask._(
    this,
    UfbtProgress(
      id: id ?? 'progress-${++_progressSeq}',
      title: title,
      state: UfbtProgressState.started,
      current: 0,
      total: total,
    ),
    throttle ?? UfbtProgressThrottle(),
  );
  emit(UfbtProgressEvent(time: _clock(), progress: task.progress));
  return task;
}