formatValue method

String formatValue(
  1. double value,
  2. String single
)

Format the given value.

Implementation

String formatValue(final double value, final String single) {
  final actual = value.round();
  return '$actual ${actual == 1 ? single : "${single}s"}';
}