pluralize function

String pluralize(
  1. String word,
  2. int count
)

Returns the plural form of a word based on the count

Implementation

String pluralize(String word, int count) {
  if (count == 1) return word;
  return '${word}s';
}