toCurrencyString method
Implementation
String toCurrencyString({
String locale = 'en_US',
String symbol = '\$',
int fractionDigits = 2,
}) {
final value = this ?? 0.0;
final format = NumberFormat.currency(
locale: locale,
symbol: symbol,
decimalDigits: fractionDigits,
);
return format.format(value);
}