CurrencyFormatter class

Helper class for formatting monetary values consistently across the app.

This wrapper centralizes currency-specific options (locale, symbol, decimal precision, grouping) so UI widgets don’t have to duplicate logic.

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(Object? amount, {String? currencySymbol, String? currencyCode, String? locale, int decimalDigits = 2, bool useGrouping = true, bool showCode = false, String? customPattern}) String
Formats a numeric or string amount into a localized currency string.
formatDelta(num amount, {String? currencySymbol, String? currencyCode, String? locale, int decimalDigits = 2}) String
Formats a delta value with +/- semantics (useful for discounts).
formatRange(num minAmount, num maxAmount, {String? currencySymbol, String? currencyCode, String? locale, int decimalDigits = 2}) String
Formats a min/max price range.