title: Dart File.writeAsString() method does not write to file if await is not done immediately
body: <p>I have the following Dart code that doesn't behave as I expected:</p>
  
  <pre><code>final File file = File("result.csv");
  
  Future send(String message) async {
    try {
      await file.writeAsString(message + '\n',
          mode: FileMode.append, flush: true);
    } catch (e) {
      print("Error: $e");
    }
    return await file.length();
  }
  
  main() async {
    final futures = &lt;Future&gt;[];
    for (int i = 0; i &lt; 100; i++) {
      futures.add(send("$i"));
    }
    for (int i = 0; i &lt; 100; i++) {
      print(await futures[i]);
    }
  }
  </code></pre>
  
  <p>I expected the file to be written as soon as each call to <code>await futures[i]</code> in the second loop returned. However this does not seem to be happening.</p>
  
  <p>The file should contain one line for each index from 0 to 99. But it contains a line with <code>99</code> followed by an empty line. And the print calls in the second loop always print the same file length, <code>3</code>.</p>
  
  <p>The event loop seems to be somehow merging the calls and only actually executing the last call, even though I still get 100 different futures that I await in the second loop.</p>
  
  <p>Why is this happening and how can I allow the futures to run without awaiting them immediately (I really need to await only later, when all of the calls to <code>send</code> have been made)?</p>