he previous
// line to start printing 1, 2, 3
final subscription = connectable.connect();

// Stop emitting items from the source stream and close the underlying
// Subject
subscription.cancel();
</code></pre>
    </section>
    
    <section class="summary source-code" id="source">
      <h2><span>Implementation</span></h2>
      <pre class="language-dart"><code class="language-dart">ConnectableObservable&lt;T&gt; publish() =&gt; PublishConnectableObservable&lt;T&gt;(this);</code></pre>
    </section>

  <