getCurrencyStr function

String getCurrencyStr(
  1. dynamic value,
  2. bool showSymbol
)

Implementation

String getCurrencyStr(dynamic value, bool showSymbol) {
  value ??= 0;
  NumberFormat formatter =
      NumberFormat.currency(locale: 'pt_BR', symbol: showSymbol ? 'R\$' : '');
  return formatter.format(value);
}