eamSink</a> is finished.</p>
<p>If the <code>StreamSink</code> fails with an error,
perhaps in response to adding events using <a href="dart-async/EventSink/add.html">add</a>, <a href="dart-async/EventSink/addError.html">addError</a> or <a href="dart-async/StreamSink/close.html">close</a>,
the <a href="dart-async/StreamSink/done.html">done</a> future will complete with that error.</p>
<p>Otherwise, the returned future will complete when either:</p>
<p>all events have been processed and the sink has been clo