title: How to convert BASE64 string into Image with Flutter?
body: <p>I'm converting images saved in my Firebase database to Base64 and would like to decode and encode.  I've researched similar questions, but am still getting errors.  Here is what I have so far?</p>
  
  <pre><code>var image1 = String;
  
  var pic = event.snapshot.value['image'];
  var photo = BASE64.decode(pic);
  image1 = photo;
  </code></pre>
  
  <p>I'm getting the following error...</p>
  
  <p><code>A value of type "List&lt;int&gt;" cannot be assigned to a variable of type "Type"</code></p>
  
  <p>If you could please provide a reverse process for encoding an image into Base64 so they may be saved back to Firebase, that would be appreciated.</p>
  
  <p>*** UPDATE</p>
  
  <p>Here is my updated code that's still throwing an error.</p>
  
  <pre><code>image1 = event.snapshot.value['image'];
  var image = BASE64.decode(image1.toString());
  new Image.memory(image),
  </code></pre>
  
  <p>The error is...</p>
  
  <p><code>FormatException: Invalid Length must be a multiple of 4</code></p>