format method

String format (
  1. String value,
  2. [String parseCommaDelimiter = ',',
  3. String thousandParseDelimiter = '.']
)

Implementation

static String format(String value,
    [String parseCommaDelimiter = ',', String thousandParseDelimiter = '.']) {
  final formatter = NumberFormat('Rp ###,###.###', 'id-ID');
  return formatter.format(
    parse(
      value,
      parseCommaDelimiter,
      thousandParseDelimiter,
    ),
  );
}