percentage static method
returns a double as a percentage to the given precision
e.g. 0.11 becomes 11% if precision
is 0.
Implementation
static String percentage(double progress, int precision) =>
'${(progress * 100).toStringAsFixed(precision)}%';