formatDecimalPattern method

String formatDecimalPattern(
  1. dynamic value,
  2. String pattern
)

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;
}