Search code examples
dartnumber-formatting

Adding dots to int in dart


I have a number like 197695863 and I want to convert it to human readable format such as 197.695.863 in Dart. I could not find a way to do this converting process. Anyone know that how to achieve this formatting?


Solution

  •   final f = NumberFormat("###,###.###", "tr_TR");
      f.format(d.truncate());
    

    This piece of code might solve the problem.