title: Flutter/Dart programmatically unicode string
body: <p>I have a list of customized icons to my app, it comes like below setted as IconData, note <code>codePoint</code> (0xe931).</p>
  <pre class="lang-dart prettyprint-override"><code>IconData angry_face = IconData(0xe931, fontFamily: _fontFamily);
  </code></pre>
  <p>There's nothing wrong with that, but I've some cases where I need this icon as Unicode string to be used as a text. It should be done just like:</p>
  <pre class="lang-dart prettyprint-override"><code>// It works too
  Text('\ue931', style: TextStyle(fontFamily: _fontFamily));
  </code></pre>
  <p>The problem is:</p>
  <p>I don't wanna use this code &quot;by hand&quot; because this icons are changed constantly by designers team and sometimes it changes its code messing up my app icons. What I need to do is get the icon object and parse it to the Unicode string, so I can use it with a Text widget.</p>
  <p>I thought that would work to get programmatically that code and just use it, but it don't:</p>
  <pre class="lang-dart prettyprint-override"><code>var iconcode = iconData.codePoint.toRadixString(16);
  
  var result;
  
  // Error: An escape sequence starting with '\u'
  // must be followed by 4 hexadecimal digits or
  // from 1 to 6 digits between '{' and '}'
  result = '\u$iconcode';
  
  // Just a simple string
  result = '\\u$iconcode';
  
  </code></pre>
  <p>In few words: How can I parse programmatically int codePoint to a valid Unicode string?</p>