toPercentage method
Converts to a percentage string (multiplying by 100
).
fractionDigits
is the number of fraction digits.suffix
the percentage suffix. Default:%
Implementation
String toPercentage({int fractionDigits = 2, String suffix = '%'}) =>
(this * 100).toStringAsFixed(fractionDigits) + suffix;