plural method Null safety

String plural(
  1. num howMany,
  2. {String? zero,
  3. String? one,
  4. String? two,
  5. String? few,
  6. String? many,
  7. required String other,
  8. String? desc,
  9. Map<String, Object>? examples,
  10. String? locale,
  11. int? precision,
  12. String? name,
  13. List<Object>? args,
  14. String? meaning,
  15. bool? skip}

Formats a message differently depending on howMany.

Selects the correct plural form from the provided alternatives. The other named argument is mandatory. The precision is the number of fractional digits that would be rendered when howMany is formatted. In some cases just knowing the numeric value of howMany itsef is not enough, for example "1 mile" vs "1.00 miles"

For an explanation of plurals and the zero, one, two, few, many categories see


static String plural(num howMany,
    {String? zero,
    String? one,
    String? two,
    String? few,
    String? many,
    required String other,
    String? desc,
    Map<String, Object>? examples,
    String? locale,
    int? precision,
    String? name,
    List<Object>? args,
    String? meaning,
    bool? skip}) {
  // Call our internal method, dropping examples and desc because they're not
  // used at runtime and we want them to be optimized away.
  return _plural(howMany,
      zero: zero,
      one: one,
      two: two,
      few: few,
      many: many,
      other: other,
      locale: locale,
      precision: precision,
      name: name,
      args: args,
      meaning: meaning);