formatAsCompact method

String formatAsCompact({
  1. String? locale,
})

Formats the number in a compact form with the given locale.

Implementation

String formatAsCompact({String? locale}) {
  return NumberFormat.compact(locale: locale).format(this);
}