progress method
UfbtProgressTask
progress(
- String title, {
- int? total,
- String? id,
- 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;
}