DHUNumberFormatExtensions extension
Extension methods for the num type to format numbers using the intl package.
- on
Methods
-
formatAsCompact(
{String? locale}) → String -
Available on num, provided by the DHUNumberFormatExtensions extension
Formats the number in a compact form with the givenlocale. -
formatAsCompactCurrency(
{String? locale, String? name, int? decimalDigits}) → String -
Available on num, provided by the DHUNumberFormatExtensions extension
Formats the number as compact simple currency with the givenlocaleandname. -
formatAsCompactLong(
{String? locale, bool explicitSign = false}) → String -
Available on num, provided by the DHUNumberFormatExtensions extension
Formats the number in a long compact form with the givenlocale. -
formatAsCurrency(
{String? locale, String symbol = r'$', int decimalDigits = 2, String? customPattern}) → String -
Available on num, provided by the DHUNumberFormatExtensions extension
Formats the number as currency with the givenlocale,symbol, anddecimalDigits. -
formatAsDecimal(
{String? locale}) → String -
Available on num, provided by the DHUNumberFormatExtensions extension
Formats the number as a decimal with the givenlocaleanddecimalDigits. -
formatAsDecimalPercent(
{String? locale, int? decimalDigits}) → String -
Available on num, provided by the DHUNumberFormatExtensions extension
Formats the number as a decimal percentage with the givenlocaleanddecimalDigits. -
formatAsPercentage(
{String? locale}) → String -
Available on num, provided by the DHUNumberFormatExtensions extension
Formats the number as a percentage with the givenlocale. -
formatAsReadableNumber(
{String? locale, int decimalDigits = 2, String? groupingSeparator, String? decimalSeparator, bool trimTrailingZeros = false}) → String -
Available on num, provided by the DHUNumberFormatExtensions extension
Formats this number into a readable string with customizable options. -
formatAsScientific(
{String? locale}) → String -
Available on num, provided by the DHUNumberFormatExtensions extension
Formats the number as a scientific value with the givenlocale. -
formatAsSimpleCurrency(
{String? locale, String? name, int? decimalDigits}) → String -
Available on num, provided by the DHUNumberFormatExtensions extension
Formats the number as simple currency with the givenlocaleandname. -
formatWithCustomPattern(
String pattern, {String? locale}) → String -
Available on num, provided by the DHUNumberFormatExtensions extension
Formats the number using a custompatternwith the givenlocale.