pluralize method

String pluralize(
  1. String word,
  2. int count,
  3. bool inclusive
)

Pluralize or singularize a word based on the passed in count.

Implementation

String pluralize(String word, int count, bool inclusive) {
  final String pluralized = count == 1 ? singular(word) : plural(word);

  return (inclusive ? '$count ' : '') + pluralized;
}