toCurrency method

String toCurrency({
  1. String symbol = '\$',
})

Converts the number to a currency string with a customizable symbol.

Implementation

String toCurrency({String symbol = '\$'}) => '$symbol${toStringAsFixed(2)}';