circularProgressValue property

double get circularProgressValue

Implementation

double get circularProgressValue {
  if (widget.totalMinutes == 0) {
    return 0; //avoid dividing by 0
  }

  if (widget.minutesLeft == 1) {
    return 1; //avoid close to infinity
  }

  return (1 - widget.minutesLeft / widget.totalMinutes);
}