formatAsCurrency method
Formats the number as currency with the given locale
, symbol
, and decimalDigits
.
Implementation
String formatAsCurrency({
String? locale,
String symbol = r'$',
int decimalDigits = 2,
}) {
return NumberFormat.currency(
locale: locale, symbol: symbol, decimalDigits: decimalDigits)
.format(this);
}