fraction property
double?
get
fraction
Implementation
double? get fraction {
final completedValue = completed;
final totalValue = total;
if (completedValue == null || totalValue == null) return null;
if (totalValue <= 0) return 1;
return completedValue / totalValue;
}