PluralForm class

Represents a plural form with support for all CLDR pluralization categories

Constructors

PluralForm({required String one, required String other, required int value, String? zero, String? two, String? few, String? many, String? locale})

Properties

few String?
The translation for few items (optional, used in Slavic languages)
final
hashCode int
The hash code for this object.
no setterinherited
locale String?
The locale for which this plural form is intended
final
many String?
The translation for many items (optional, used in some languages)
final
one String
The translation for exactly 1 item (singular)
final
other String
The translation for all other cases (default plural)
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
two String?
The translation for exactly 2 items (optional, used in some languages)
final
value int
The numeric value to determine pluralization
final
zero String?
The translation for 0 items (optional)
final

Methods

getAppropriateTranslation() String
Gets the appropriate translation string based on the value and locale
getTranslationForCategory(PluralCategory category) String?
Gets the translation string for the given plural category
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited