getCurrency method

String getCurrency(
  1. int amount, {
  2. bool withoutRp = false,
})

Implementation

String getCurrency(int amount, {bool withoutRp = false}) {
  var myFormat = new NumberFormat("#,###", "ind");
  if (withoutRp) return myFormat.format(amount);
  return "Rp. " + myFormat.format(amount);
}