update method

void update({
  1. int? current,
  2. int? total,
  3. String? message,
})

Implementation

void update({int? current, int? total, String? message}) {
  if (_progress.isDone) return;
  _progress = _progress.copyWith(
    state: UfbtProgressState.running,
    current: current,
    total: total,
    message: message,
  );
  if (!_throttle.shouldEmit(_progress.fraction)) return;
  _logger._emitProgress(_progress);
}