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, andflag.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
amountaccording 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
- CAD → const CurrencyType
- CNY → const CurrencyType
- EUR → const CurrencyType
- GBP → const CurrencyType
- INR → const CurrencyType
- JPY → const CurrencyType
- MXN → const CurrencyType
- NZD → const CurrencyType
- SGD → const CurrencyType
- TRY → const CurrencyType
- USD → const CurrencyType
- --- Currency Constants ---
- ZAR → const CurrencyType