Returns a formatted percentage string from a double value.
String toPercentage(double value, int fractionDigits) { return '${(value * 100).toStringAsFixed(fractionDigits)} %'; }