title: Dart how to add commas to a string number
body: <p>I'm trying to adapt this:
  <a href="https://stackoverflow.com/questions/721304/insert-commas-into-number-string">Insert commas into number string</a>
  to work in dart, but no luck.</p>
  
  <p>either one of these don't work:</p>
  
  <pre><code>print("1000200".replaceAllMapped(new RegExp(r'/(\d)(?=(\d{3})+$)'), (match m) =&gt; "${m},"));
  print("1000300".replaceAll(new RegExp(r'/\d{1,3}(?=(\d{3})+(?!\d))/g'), (match m) =&gt; "$m,"));
  </code></pre>
  
  <p>Is there a simpler/working way to add commas to a string number?</p>