formatDoubleComma3 static method

String formatDoubleComma3(
  1. Object num, {
  2. int digit = 3,
  3. String pattern = ',',
})

每隔3三位加逗号 num 数字或数字字符串。double型。

Implementation

static String formatDoubleComma3(Object num,
    {int digit = 3, String pattern = ','}) {
  List<String> list = num.toString().split('.');
  String left =
      formatDigitPatternEnd(list[0], digit: digit, pattern: pattern);
  String right = list[1];
  return '$left.$right';
}