formatCurrency function
Implementation
String? formatCurrency({double? value, Decimal? decimalValue}) {
if (value == null && decimalValue == null) {
return null;
}
if (decimalValue != null) {
value = decimalValue.toDouble();
}
return NumberFormat.currency(locale: 'pt_BR', symbol: 'R\$').format(value);
}