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
andname
. -
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
, anddecimalDigits
. -
formatAsDecimal(
{String? locale, int decimalDigits = 2}) → String -
Formats the number as a decimal with the given
locale
anddecimalDigits
. -
formatAsDecimalPercent(
{String? locale, int decimalDigits = 2}) → String -
Formats the number as a decimal percentage with the given
locale
anddecimalDigits
. -
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
andname
. -
formatWithCustomPattern(
String pattern, {String? locale}) → String -
Formats the number using a custom
pattern
with the givenlocale
.