currency function

String currency(
  1. num? n, [
  2. int decimals = 2
])

Implementation

String currency(num? n, [int decimals = 2]) =>
    NumberFormat.simpleCurrency(locale: localeUS, decimalDigits: decimals)
        .format(n?.toDouble() ?? 0);