doubleFormat static method

String doubleFormat(
  1. double? value, {
  2. int length = 4,
  3. int round = 0,
})

number transform 3: from

Implementation

static String doubleFormat(
  double? value, {
  int length = 4,
  int round = 0,
}) {
  if (value == null) {
    return '~';
  }
  NumberFormat f =
      NumberFormat(",##0${length > 0 ? '.' : ''}${'#' * length}", "en_US");
  return f.format(value);
}