convertNumberToText method
Implementation
String convertNumberToText(String numberToFormat) {
var formattedNumber = NumberFormat.compactCurrency(
decimalDigits: 2,
// if you want to add currency symbol then pass that in this else leave it empty.
symbol: '',
).format(double.parse(numberToFormat));
return formattedNumber;
}