percent property

double get percent

Converts an int value to a percentage (0.0 to 1.0).

Divides the value by 100 to convert from percentage notation to a decimal. For example, 50.percent returns 0.5.

Useful for calculations requiring percentage values in decimal form.

Implementation

double get percent => toDouble() / 100;