NumberFormat.compactSimpleCurrency constructor

  1. {String? locale,
  2. String? name,
  3. int? decimalDigits}

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.


factory NumberFormat.compactSimpleCurrency(
    {String? locale, String? name, int? decimalDigits}) {
  return _CompactNumberFormat(
      locale: locale,
      formatType: _CompactFormatType.COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN,
      name: name,
      getPattern: (symbols) => symbols.CURRENCY_PATTERN,
      decimalDigits: decimalDigits,
      lookupSimpleCurrencySymbol: true,
      isForCurrency: true);