other type of set is needed, either use <a href="dart-async/Stream/forEach.html">forEach</a> to add each
element to the set, or use
<code>toList().then((list) =&gt; new SomeOtherSet.from(list))</code>
to create the set.</p>
<p>If this stream emits an error,
the returned future is completed with that error,
and processing stops.</p>
    </section>
    
    <section class="summary source-code" id="source">
      <h2><span>Implementation</span></h2>
      <pre class="language-dart"><code class="language-dart">