title: Convert image asset to base64 in Flutter
body: <p>How to convert an image on my assets folder to base64 using Flutter?</p>
  
  <p>My pubspec.yaml</p>
  
  <pre><code>assets:
   - assets/sticker_packs.wasticker
   - assets/WAStickersPack/
  </code></pre>
  
  <p><code>sticker_packs.wasticker</code> is a json map to all .png images under <code>assets/WAStickersPack/</code></p>
  
  <p>I get files so</p>
  
  <pre><code>for (var item in stickers) {
    var file = 'assets/WAStickersPack/' + item["image_file"];
  
    var img = AssetImage(file);
    //or
    var imgto = await rootBundle.load(file);
  }
  </code></pre>
  
  <p>But i dont know how to convert to base64</p>