expiryFraction property
double
get
expiryFraction
Fraction of the OTP lifetime left (1 -> 0).
Implementation
double get expiryFraction {
final total = countdownSeconds;
return total <= 0 ? 0 : (secondsRemaining / total).clamp(0, 1);
}