pluralize method

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

Returns a localized string based on the plural category of this number.

This uses the Intl.plural function to determine the appropriate plural form for the current locale and number.

Arguments:

  • other: The string to return for plural forms other than zero, one, two, few, or many.
  • zero, one, two, few, many: Strings for specific plural forms (optional).
  • desc, examples, locale, name, args, meaning, skip: Optional parameters for fine-tuning the pluralization logic (see Intl.plural documentation).

Implementation

String pluralize({
  required String other,
  String? zero,
  String? one,
  String? two,
  String? few,
  String? many,
  String? desc,
  Map<String, Object>? examples,
  String? locale,
  int? precision,
  String? name,
  List<Object>? args,
  String? meaning,
  bool? skip,
}) =>
    Intl.plural(
      this,
      other: other,
      zero: zero,
      one: one,
      two: two,
      few: few,
      many: many,
      desc: desc,
      examples: examples,
      locale: locale,
      precision: precision,
      name: name,
      args: args,
      meaning: meaning,
      skip: skip,
    );