select method
Returns the appropriate PluralCategory for the given number.
Example for English (en-US):
PluralRules(locale: Locale.parse('en-US'))
.select(1) == PluralCategory.one
PluralRules(locale: Locale.parse('en-US'))
.select(2) == PluralCategory.other
Example for a language like Polish (pl), which has a 'few' category:
PluralRules(locale: Locale.parse('pl')).select(3) == PluralCategory.few
Implementation
PluralCategory select(num number) {
if (isInTest) {
return PluralCategory.other;
} else {
return _pluralRulesImpl.selectImpl(number);
}
}