title: How does one (and should one?) cancel a stream from an await-for loop in Dart?
body: <p>I have a question about Dart streams, as follows. When I use a Stream via its <code>listen()</code> method, I can assign the result returned by <code>listen</code> to a variable and cancel the Subscription when I'm done (such as a <code>dispose()</code> method). How should I go about canceling a Stream listened by an <code>await-for</code> loop?</p>
  
  <p>Just to clarify, I am not looking to change the flow of execution (as in, to cancel the Stream so that the code after the <code>await-for</code> runs), but to prevent memory leaks when I don't need the Stream anymore.</p>