formatDecimalPattern method
Implementation
String formatDecimalPattern(dynamic value, String pattern) {
if (value is int) value = value.toDouble();
final formatter = new NumberFormat(pattern, "en");
String newText = formatter.format(value);
return newText;
}