fraction property

double get fraction

Value as 0-1.

Implementation

double get fraction => max <= 0 ? 0 : (value / max).clamp(0, 1).toDouble();