update method

void update(
  1. double progress, {
  2. String? newTask,
  3. double? total,
})

Implementation

void update(double progress, {String? newTask, double? total}) {
  bool isDifferent =
      this.progress != progress || (newTask != null && newTask != this.task);
  if (total != null) {
    _total = total;
  }
  this._progress = progress;
  if (newTask != null) {
    this._task = newTask;
  }

  if (isDifferent) {
    notifyListeners();
  }
}