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,
String? customPattern,
}) {
return NumberFormat.currency(
locale: locale,
symbol: symbol,
decimalDigits: decimalDigits,
customPattern: customPattern,
).format(this);
}