CurrencyType class

A model class representing a currency type

Constructors

CurrencyType({String? currencyCode, String? currencySymbol, String? flag})
Creates a CurrencyType with the given currencyCode, currencySymbol, and flag.
const

Properties

currencyCode String?
The 3-letter ISO currency code (e.g., "USD", "INR").
final
currencySymbol String?
The currency symbol (e.g., $, , ).
final
flag String?
A flag emoji or icon representing the country/region.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

formatCurrency(num amount, {bool withSymbol = true, bool withGrouping = true, int decimalDigits = 2, String? customSymbol, String? customLocale, String? customPattern, String? decimalSeparator, String? groupingSeparator}) String
Formats a given amount according to locale OR custom options.
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 List<CurrencyType>
All supported currencies
AUD → const CurrencyType
Australian Dollar
CAD → const CurrencyType
Canadian Dollar
CNY → const CurrencyType
Chinese Yuan
EUR → const CurrencyType
Euro
GBP → const CurrencyType
British Pound
INR → const CurrencyType
Indian Rupee
JPY → const CurrencyType
Japanese Yen
MXN → const CurrencyType
Mexican Peso
NZD → const CurrencyType
New Zealand Dollar
SGD → const CurrencyType
Singapore Dollar
TRY → const CurrencyType
Turkish Lira
USD → const CurrencyType
--- Currency Constants --- US Dollar
ZAR → const CurrencyType
South African Rand