toPct property
String
get
toPct
Returns a CSS-formatted dimension string with '%' unit.
Example:
final number = 12.0;
final pctString = number.toPct;
// returns: '12%'
Implementation
String get toPct => '${clamp(0, 100).toCleanString}%';