title: How to await Uint8List bytes inside a widget to create a memory image Flutter
body: <p>i'm trying to generate a memory image from a base64 string, but my problem is that the widget goes into an error because the &quot;Uint8List bytes&quot; is empty for a few seconds before the image is loaded:</p>
  <blockquote>
  <p>The following NoSuchMethodError was thrown building:
  The getter 'length' was called on null.
  Receiver: null
  Tried calling: length</p>
  </blockquote>
  <p>a few seconds later the widget shows the image and the red screen is gone.</p>
  <p>how i do to wait that  the Uint8List bytes is complete before draw the widget? i try to use await but i can't use this inside the widget.</p>
  <pre><code>Widget build(BuildContext context) {
    Uint8List bytes = ***await*** base64Decode(_base64);
  return MaterialApp(
    title: 'My image',
    home: Scaffold(
      appBar: AppBar(
        title: Text('My image'),
      ),
      body: Container(
      width: 130,
      height: 130,
      margin: EdgeInsets.all(5),
      child:   Image.memory(bytes, fit: BoxFit.fill,),
    ),
    ),
  );
  </code></pre>
  <p>}</p>