update method

void update ({int value, int max, String actual })

Implementation

void update({int value, int max, String actual}) {

  if ((value == this.value || value == null) && (max == this.max || max == null) && (actual == this.actual || actual == null)) {
    return;
  }

  this.max = max ?? this.max;
  this.value = value ?? this.value;
  this.actual = actual ?? this.actual;

  this.render();
}