thousandNumberFormat function
Implementation
String thousandNumberFormat(String? amountValue) {
String amountString = "0";
if (amountValue == null || amountValue == "" || amountValue == "N/A") {
amountString = "0";
}
else {
amountString = amountValue;
}
double? amount = double.tryParse(amountString);
late String convertedAmount;
var formatter = NumberFormat("###,###");
convertedAmount = formatter.format(amount);
return convertedAmount;
}