toPluralFormForQuantity method
Converts this string to the appropriate plural form to describe the specified quantity
, including the quantity
in the returned result if includeQuantity
is true
.
Implementation
String toPluralFormForQuantity({
required num quantity,
bool includeQuantity = true,
String? locale,
}) {
final pluralized = quantity == 1
? toSingularForm(locale: locale)
: toPluralForm(locale: locale);
final result = '${includeQuantity ? '$quantity ' : ''}$pluralized';
return result;
}