title: How to wait for async in initState
body: <p>I have an async function that needs to be called in initState in an Stateful widget, but I cannot use await as initState is not async.</p>
  
  <p><code>sendHealthData</code> is <code>async</code> as it get some information from the Health Api, and then I need to send that information to HomeSubScreen which is another <code>StatefulWidget</code>. But at the time the HomeSubScreen is created, the <code>sendHealthData</code> method didn't get all the information, so If I try to send some value in a param to the <code>HomeSubScreen</code>, the value will be null.</p>
  
  <p>How can I do that?</p>
  
  <pre><code>@override
    void initState() {
      super.initState();
      sendHealthData();
      _widgetOptions = &lt;Widget&gt;[
        HomeSubScreen(healthData),
      ];
  
    }
  </code></pre>
  
  <p>Update:
  If I added a then() I get the following error:</p>
  
  <pre><code>NoSuchMethodError: The method 'elementAt' was called on null.
  </code></pre>
  
  <p>Code Updated:</p>
  
  <pre><code>@override
        void initState() {
          super.initState();
          sendHealthData().then((response){
               _widgetOptions = &lt;Widget&gt;[
                   HomeSubScreen(healthData),
                ];
          });
  
  
        }
  </code></pre>