NumberFormat.compact constructor

NumberFormat.compact(
  1. {String? locale,
  2. bool explicitSign = false}
)

A number format for compact representations, e.g. "1.2M" instead of "1,200,000".

Implementation

factory NumberFormat.compact({String? locale, bool explicitSign = false}) {
  return _CompactNumberFormat(
      locale: locale,
      formatType: _CompactFormatType.COMPACT_DECIMAL_SHORT_PATTERN,
      explicitSign: explicitSign);
}