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">Future&lt;bool&gt; contains(Object needle) {
  _Future&lt;bool&gt; future = new _Future&lt;bool&gt;();
  StreamSubscription subscription;
  subscription = this.listen(
      (T element) {
        _runUserCode(() =&gt; (element == needle), (bool isMatch) {
          if (isMatch) {
            _cancelAndValue