getPriceWithOutRuppe function

String getPriceWithOutRuppe(
  1. String text
)

Implementation

String getPriceWithOutRuppe(String text) {
  if(text.isNotEmpty)
  {
    try {
      var formatter = NumberFormat('#,##,###');
      return formatter.format(double.parse(text));
    } catch (e) {
      return text;
    }
  }
  else
  {
    return text;
  }
}