update method
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();
}
}