title: How to remove whitespace within in a string in Flutter / dart and capitalize first letter of each word
body: <p>I want to remove white space within a string like extra spaces in between the words. I have tried <code>trim()</code> method. but it only removes the leading and trailing whitespace I want to remove the spaces in between the string and I want to convert the first letter of the each word to capital .
  example : <code>var name = ' Aneesh     devala   '</code> to <code>Aneesh Devala</code></p>
  <p>I have tried <a href="https://stackoverflow.com/questions/51508321/how-to-remove-all-whitespace-of-a-string-in-dart">this answers</a> but it's not suitable for mine.</p>