AmountFormatter class
Safe amount and currency formatting helpers.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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
Static Methods
-
format(
num? value, {String symbol = '₹', int decimalDigits = 0, String locale = defaultLocale, String fallbackValue = fallback}) → String - Backward-compatible alias for nullable amount formatting.
-
formatAmount(
num amount, {String symbol = '₹', String locale = defaultLocale, int decimalDigits = 0}) → String -
Formats a non-null
amountusing Indian currency grouping. -
formatCompact(
num? value, {String symbol = '₹', int fractionDigits = 1, String fallbackValue = fallback}) → String - Backward-compatible alias for compact formatting.
-
formatCompactAmount(
num amount, {String symbol = '₹', int fractionDigits = 1}) → String -
Formats
amountusing K/L/Cr compaction. -
formatNullableAmount(
num? amount, {String symbol = '₹', String locale = defaultLocale, int decimalDigits = 0}) → String -
Formats a nullable
amount.
Constants
- defaultLocale → const String
- Default locale used for currency formatting.
- fallback → const String
- Placeholder returned for null and invalid values.