CurrencyInfo class

Holds language-specific information about a currency's units and separators.

This class provides the necessary textual components (like "dollar", "dollars", "cent", "cents", "and") for formatting numbers as currency amounts in words using the currency: true option in language-specific BaseOptions.

It handles singular and various plural forms required by different languages, especially Slavic languages which have complex declension rules based on number.

Constructors

CurrencyInfo({required String mainUnitSingular, String? mainUnitPlural, String? mainUnitPlural2To4, String? mainUnitPluralGenitive, String? subUnitSingular, String? subUnitPlural, String? subUnitPlural2To4, String? subUnitPluralGenitive, String? separator})
Creates a const instance defining currency unit names and separators.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
mainUnitPlural String?
The standard plural form of the main currency unit (e.g., "dollars", "euros", "lekë"). Used for counts 0 and 2+ in many languages. May be null if the singular form is always used or if specific plural forms (mainUnitPlural2To4, mainUnitPluralGenitive) cover all other cases.
final
mainUnitPlural2To4 String?
The specific plural form for counts ending in 2, 3, or 4 (excluding 12, 13, 14). Primarily used in Slavic languages (e.g., Russian "рубля", Polish "złote", Czech "koruny"). This often corresponds to the Nominative Plural case.
final
mainUnitPluralGenitive String?
The specific plural form (often Genitive Plural) for counts ending in 0, 1 (sometimes, e.g., Lithuanian > 10), 5-9, and 11-19. Primarily used in Slavic languages (e.g., Russian "рублей", Polish "złotych", Czech "korun").
final
mainUnitSingular String
The singular form of the main currency unit (e.g., "dollar", "euro", "lek"). Used when the count is 1.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
separator String?
The word(s) used to separate the main unit amount from the subunit amount (e.g., "and", "et", "und", "и", "με", "con"). Can be null if no separator is used.
final
subUnitPlural String?
The standard plural form of the fractional currency subunit (e.g., "cents", "qindarka", "kopeks"). Used for subunit counts 0 and 2+ in many languages. May be null if the singular form is always used or specific plural forms cover other cases.
final
subUnitPlural2To4 String?
The specific plural form of the subunit for counts ending in 2, 3, or 4 (excluding 12-14). Primarily used in Slavic languages (e.g., Russian "копейки", Polish "grosze"). Often Nominative Plural.
final
subUnitPluralGenitive String?
The specific plural form (often Genitive Plural) of the subunit for counts ending in 0, 1 (sometimes), 5-9, 11-19. Primarily used in Slavic languages (e.g., Russian "копеек", Polish "groszy").
final
subUnitSingular String?
The singular form of the fractional currency subunit (e.g., "cent", "qindarkë", "kopek"). Used when the subunit count is 1. Can be null if the currency has no subunit.
final

Methods

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

Constants

all → const CurrencyInfo
Albanian Lek (ALL) currency details for Albanian (Lang.SQ).
amd → const CurrencyInfo
Armenian Dram (AMD) currency details for Armenian (Lang.HY).
azn → const CurrencyInfo
Azerbaijani Manat (AZN) currency details for Azerbaijani (Lang.AZ).
bam → const CurrencyInfo
Bosnia and Herzegovina Convertible Mark (BAM) currency details for Bosnian (Lang.BS).
bdt → const CurrencyInfo
Bangladeshi Taka (BDT) currency details for Bengali (Lang.BN).
bgn → const CurrencyInfo
Bulgarian Lev (BGN) currency details for Bulgarian (Lang.BG).
brl → const CurrencyInfo
Brazilian Real (BRL) currency details for Portuguese (Lang.PT).
byn → const CurrencyInfo
Belarusian Ruble (BYN) currency details for Belarusian (Lang.BE).
cny → const CurrencyInfo
Chinese Yuan Renminbi (CNY) currency details for Chinese (Lang.ZH).
czk → const CurrencyInfo
Czech Koruna (CZK) currency details for Czech (Lang.CS).
dkk → const CurrencyInfo
Danish Krone (DKK) currency details for Danish (Lang.DA).
etb → const CurrencyInfo
Ethiopian Birr (ETB) currency details for Amharic (Lang.AM).
eurDe → const CurrencyInfo
Euro (EUR) currency details for German (Lang.DE).
eurEl → const CurrencyInfo
Euro (EUR) currency details for Greek (Lang.EL).
eurEs → const CurrencyInfo
Euro (EUR) currency details for Spanish (Lang.ES).
eurFi → const CurrencyInfo
Euro (EUR) currency details for Finnish (Lang.FI). Finnish uses grammatical cases.
eurFr → const CurrencyInfo
Euro (EUR) currency details for French (Lang.FR).
eurHr → const CurrencyInfo
Euro (EUR) currency details for Croatian (Lang.HR).
eurIt → const CurrencyInfo
Euro (EUR) currency details for Italian (Lang.IT).
eurLt → const CurrencyInfo
Euro (EUR) currency details for Lithuanian (Lang.LT). Requires multiple plural forms.
eurLv → const CurrencyInfo
Euro (EUR) currency details for Latvian (Lang.LV).
eurMt → const CurrencyInfo
Euro (EUR) currency details for Maltese (Lang.MT).
eurNl → const CurrencyInfo
Euro (EUR) currency details for Dutch (Lang.NL).
eurPt → const CurrencyInfo
Euro (EUR) currency details for Portuguese (Lang.PT).
eurSk → const CurrencyInfo
Euro (EUR) currency details for Slovak (Lang.SK). Requires multiple plural forms.
eurSl → const CurrencyInfo
Euro (EUR) currency details for Slovenian (Lang.SL). Requires dual and plural forms.
gbp → const CurrencyInfo
British Pound Sterling (GBP) currency details for English (Lang.EN). Note: Added because it's used in Num2Text examples.
gel → const CurrencyInfo
Georgian Lari (GEL) currency details for Georgian (Lang.KA).
huf → const CurrencyInfo
Hungarian Forint (HUF) currency details for Hungarian (Lang.HU).
idr → const CurrencyInfo
Indonesian Rupiah (IDR) currency details for Indonesian (Lang.ID).
ils → const CurrencyInfo
Israeli New Shekel (ILS) currency details for Hebrew (Lang.HE). Note gender differences.
inrHi → const CurrencyInfo
Indian Rupee (INR) currency details for Hindi (Lang.HI).
inrTa → const CurrencyInfo
Indian Rupee (INR) currency details for Tamil (Lang.TA).
irr → const CurrencyInfo
Iranian Rial (IRR) currency details for Persian (Lang.FA).
isk → const CurrencyInfo
Icelandic Króna (ISK) currency details for Icelandic (Lang.IS).
jpy → const CurrencyInfo
Japanese Yen (JPY) currency details for Japanese (Lang.JA).
kgs → const CurrencyInfo
Kyrgyzstani Som (KGS) currency details for Kyrgyz (Lang.KY).
khr → const CurrencyInfo
Cambodian Riel (KHR) currency details for Khmer (Lang.KM).
krw → const CurrencyInfo
South Korean Won (KRW) currency details for Korean (Lang.KO).
kzt → const CurrencyInfo
Kazakhstani Tenge (KZT) currency details for Kazakh (Lang.KK).
lak → const CurrencyInfo
Lao Kip (LAK) currency details for Lao (Lang.LO).
lkr → const CurrencyInfo
Sri Lankan Rupee (LKR) currency details for Sinhala (Lang.SI).
mkd → const CurrencyInfo
Macedonian Denar (MKD) currency details for Macedonian (Lang.MK).
mmk → const CurrencyInfo
Myanmar Kyat (MMK) currency details for Burmese (Lang.MY).
mnt → const CurrencyInfo
Mongolian Tögrög (MNT) currency details for Mongolian (Lang.MN).
myr → const CurrencyInfo
Malaysian Ringgit (MYR) currency details for Malay (Lang.MS).
ngnHa → const CurrencyInfo
Nigerian Naira (NGN) currency details for Hausa (Lang.HA).
ngnIg → const CurrencyInfo
Nigerian Naira (NGN) currency details for Igbo (Lang.IG).
ngnYo → const CurrencyInfo
Nigerian Naira (NGN) currency details for Yoruba (Lang.YO).
nok → const CurrencyInfo
Norwegian Krone (NOK) currency details for Norwegian (Lang.NO).
npr → const CurrencyInfo
Nepalese Rupee (NPR) currency details for Nepali (Lang.NE).
php → const CurrencyInfo
Philippine Peso (PHP) currency details for Filipino (Lang.FIL).
pkr → const CurrencyInfo
Pakistani Rupee (PKR) currency details for Urdu (Lang.UR).
pln → const CurrencyInfo
Polish Złoty (PLN) currency details for Polish (Lang.PL). Requires multiple plural forms.
ron → const CurrencyInfo
Romanian Leu (RON) currency details for Romanian (Lang.RO).
rsd → const CurrencyInfo
Serbian Dinar (RSD) currency details for Serbian (Lang.SR). Note case similarities.
rub → const CurrencyInfo
Russian Ruble (RUB) currency details for Russian (Lang.RU). Requires multiple plural forms.
sar → const CurrencyInfo
Saudi Riyal (SAR) currency details for Arabic (Lang.AR). Plurals often handled by number word agreement.
sek → const CurrencyInfo
Swedish Krona (SEK) currency details for Swedish (Lang.SV).
thb → const CurrencyInfo
Thai Baht (THB) currency details for Thai (Lang.TH).
tjs → const CurrencyInfo
Tajikistani Somoni (TJS) currency details for Tajik (Lang.TG).
tmt → const CurrencyInfo
Turkmenistani Manat (TMT) currency details for Turkmen (Lang.TK). Note: Subunits (teňňe) are rarely used in word conversions.
tryTr → const CurrencyInfo
Turkish Lira (TRY) currency details for Turkish (Lang.TR).
tzs → const CurrencyInfo
Tanzanian Shilling (TZS) currency details for Swahili (Lang.SW).
uah → const CurrencyInfo
Ukrainian Hryvnia (UAH) currency details for Ukrainian (Lang.UK). Requires multiple plural forms.
usd → const CurrencyInfo
United States Dollar (USD) currency details, commonly used for English (Lang.EN).
uzs → const CurrencyInfo
Uzbekistani Som (UZS) currency details for Uzbek (Lang.UZ).
vnd → const CurrencyInfo
Vietnamese Đồng (VND) currency details for Vietnamese (Lang.VI).
zar → const CurrencyInfo
South African Rand (ZAR) currency details for Afrikaans (Lang.AF).
zarXh → const CurrencyInfo
South African Rand (ZAR) currency details using Xhosa (Lang.XH) terms. Note plural prefixes.
zarZu → const CurrencyInfo
South African Rand (ZAR) currency details using Zulu (Lang.ZU) terms. Note plural prefixes.