toMoney method
Attempts to parse the string as a number and formats it as a money string.
Example:
print('1234.56'.toMoney(decimalDigits: 1)); // 1,234.6
Implementation
String toMoney({int decimalDigits = 2}) => toNum.toMoney(decimalDigits: decimalDigits);