notifyProgress method

Future notifyProgress()

Implementation

Future notifyProgress() async {
  final p = _bytesProcessed.values.sum();
  var progress = (_seen + p.toDouble()) * 85 / (params.file.size * 2);
  if (lastPct == progress.round()) return;
  lastPct = progress.round();
  // log.info("Got $progress of ${totalSize.formatNumber()}");

  sendUpdate(progress: lastPct + 10.0);
}