DHUNumberFormatExtensions extension

on

Methods

formatAsCompact({String? locale}) String
Formats the number in a compact form with the given locale.
formatAsCompactCurrency({String? locale, String? name}) String
Formats the number as compact simple currency with the given locale and name.
formatAsCompactLong({String? locale}) String
Formats the number in a long compact form with the given locale.
formatAsCurrency({String? locale, String symbol = r'$', int decimalDigits = 2}) String
Formats the number as currency with the given locale, symbol, and decimalDigits.
formatAsDecimal({String? locale, int decimalDigits = 2}) String
Formats the number as a decimal with the given locale and decimalDigits.
formatAsDecimalPercent({String? locale, int decimalDigits = 2}) String
Formats the number as a decimal percentage with the given locale and decimalDigits.
formatAsPercentage({String? locale}) String
Formats the number as a percentage with the given locale.
formatAsScientific({String? locale}) String
Formats the number as a scientific value with the given locale.
formatAsSimpleCurrency({String? locale, String? name}) String
Formats the number as simple currency with the given locale and name.
formatWithCustomPattern(String pattern, {String? locale}) String
Formats the number using a custom pattern with the given locale.