double progressIn(Duration total) { if (total.inMicroseconds == 0) return 0.0; return (inMicroseconds / total.inMicroseconds).clamp(0.0, 1.0); }