addNumberCommas function
Expects a string value. Will add a comma in every 3 characters of the string.
Implementation
String addNumberCommas(String value) {
///Returns the string provided with commas added.
return value.replaceAllMapped(
RegExp(r'(\d{1,3})(?=(\d{3})+(?!\d))'), (Match m) => '${m[1]},');
}