title: (Flutter) ListView.builder using FutureBuilder not working
body: <p>I am trying to display items in a <code>ListView</code> using <code>ListView.builder</code> inside a <code>FutureBuilder</code>. My <code>future</code> function for <code>FutureBuilder</code> looks like this:</p>
  
  <pre><code>_fetchListItems() async {
     wait() async {
       number = await db.getNumber(userId); }
  
     await wait();
   List rawFavouriteList = await db.getList(number);
  
    setState((){
    rawFavouriteList.forEach((item){
         _faouriteList.add(Model.map(item));
             }});
  return _faouriteList;
  }
  </code></pre>
  
  <p>My <code>FutureBuilder</code> looks like this:</p>
  
  <pre><code>            FutureBuilder(
                 future: _fetchListItems(),
                 builder:(context, AsyncSnapshot snapshot) {
                       if (!snapshot.hasData) {
                     return Center(child: CircularProgressIndicator());
           } else {Container( child: ListView.builder(                                                  
                  itemCount: _faouriteList.length,
                  scrollDirection: Axis.horizontal,
               itemBuilder: (BuildContext context, int index) {
                    return Text(                                                 
                     '${_faouriteList[index].title}');
                }));}})
  </code></pre>
  
  <blockquote>
    <p>he following assertion was thrown building FutureBuilder(dirty, state:
    I/flutter (24728): _FutureBuilderState#f12a3):
    I/flutter (24728): A build function returned null.
    I/flutter (24728): The offending widget is: FutureBuilder
    I/flutter (24728): Build functions must never return null</p>
    
    <p>Another exception was thrown: A build function returned null.</p>
  </blockquote>
  
  <p><strong>Note:</strong> </p>
  
  <p>I tried to call <code>_fetchListItems()</code> from <code>initState</code> and not use <code>FutureBuilder</code> and that didn't work for me as well. </p>
  
  <p>Here is a link to that case: <a href="https://stackoverflow.com/questions/56693883/flutter-dart-two-async-methods-in-initstate-not-working?noredirect=1#comment99953640_56693883">(Flutter/Dart) Two async methods in initState not working</a></p>
  
  <p>Please let me know if I should use <code>FutureBuilder</code> or <code>initState</code> to wait for <code>List</code> to load it's data. And how to make it work since none of the methods seem to work for me :( </p>