NumberFormat.compactSimpleCurrency constructor
A number format for compact currency representations, e.g. "$1.2M" instead of "$1,200,000", and which will automatically determine a currency symbol based on the currency name or the locale. See NumberFormat.simpleCurrency.
Implementation
factory NumberFormat.compactSimpleCurrency(
{String locale, String name, int decimalDigits}) {
return new _CompactNumberFormat(
locale: locale,
formatType: _CompactFormatType.COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN,
name: name,
getPattern: (symbols) => symbols.CURRENCY_PATTERN,
computeCurrencySymbol: (format) =>
_simpleCurrencySymbols[format.currencyName] ?? format.currencyName,
decimalDigits: decimalDigits,
isForCurrency: true);
}