title: My async call is returning before list is populated in forEach loop
body: <p>I have a routine which gets a list of filenames from the device, then reads the file(s) to build a list.  However, the calling routine always returns with zero items.  I print the filenames, so I know they exist, however, it appears that the async is returning before I read the files.  I used similar code when making an HTTP call.  But, something here is causing the routine to return the list even though it hasn't completed.  Perhaps, it is possible that I am calling it at the wrong time?  I am calling retrieveItems here:</p>
  
  <pre><code>@override
    void initState() {
      super.initState();
      retrieveItems();
    }
  </code></pre>
  
  <p>Eventually I will have a refresh button, but for now I'd simply like the list to populate with the data from the files...</p>
  
  <h2>--------------------</h2>
  
  <p>Callee</p>
  
  <pre><code>Future&lt;List&lt;String&gt;&gt; readHeaderData() async {
    List&lt;String&gt; l = new List();
    List&lt;String&gt; files = await readHeaders(); // Gets filenames
    files.forEach((filename) async {
      final file = await File(filename);
      String contents = await file.readAsString();
      User usr = User.fromJson(json.decode(contents));
      String name = usr.NameLast + ", " + usr.NameFirst;
      print(name);
      l.add(name);
    }
    return l;
  </code></pre>
  
  <hr>
  
  <p>Caller</p>
  
  <pre><code>void retrieveItems() async {
    LocalStorage storage = new LocalStorage();
    await storage.readHeaderData().then((item) {
        try {
          if ((item != null ) &amp;&amp;(item.length &gt;= 1)) {
            setState(() {
              users.clear();
              _users.addAll(item);
            });
          } else {
            setState(() {
              _users.clear();
              final snackbar = new SnackBar(
                content: new Text('No users found.'),
              );
              scaffoldKey.currentState.showSnackBar(snackbar);
            });
          }
        } on FileNotFoundException catch (e) {
          print(e.toString()); //For debug only
          setState(() {
            _users.clear();
          });
        });
      }
    });
  </code></pre>