fraction property

double? get fraction

Progress as a 0..1 fraction; null when the total is unknown.

Implementation

double? get fraction => total > 0 ? (received / total).clamp(0.0, 1.0) : null;