percent property

double? get percent

Progress from 0 to 100, or null if the total size is unknown.

Implementation

double? get percent {
  if (total == null) return null;
  if (total == 0) return 100;
  return received / total! * 100;
}