formatAsCompactCurrency method

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

Formats the number as compact simple currency with the given locale and name.

Implementation

String formatAsCompactCurrency({
  String? locale,
  String? name,
  int? decimalDigits,
}) {
  return NumberFormat.compactSimpleCurrency(
    locale: locale,
    name: name,
    decimalDigits: decimalDigits,
  ).format(this);
}