title: How to prepare a list of functions for Future.wait?
body: <p>I want to prepare a list of functions for <code>Future.wait</code> beforehand so that I can run them all later. After some research I came up with the following:</p>
  <pre><code>Future&lt;void&gt; _processData(String name) async {
  (...)
  }
  
  List&lt;Future&lt;void&gt; Function()&gt; futures = [];
  
  for (var m in data) {
  futures.add(_processData(m.name)); 
  }
  
  Future.wait(futures);
  </code></pre>
  <p>However it comes back with <code>The argument type 'Future&lt;void&gt;' can't be assigned to the parameter type 'Future&lt;void&gt; Function()'</code> on the <code>futures.add</code> line.</p>
  <p>I thought I could skip the <code>Function()</code> in the definition of the <code>futures</code> list to match types, but then it would call all these functions right away when adding. How else would I make a list of functions like the above without calling them until <code>Future.wait</code>?</p>