updateProgress method Null safety

void updateProgress(
  1. int progress,
  2. int duration
)

Implementation

void updateProgress(int progress, int duration) {
  this.progress = progress;
  this.duration = duration;
  notifyListeners();
}