title: How do I check the end of Stream in Dart?
body: <p>fellow dart programmers.</p>
  
  <p>I am reading in a file using Stream as below.</p>
  
  
  
  <pre class="lang-dart prettyprint-override"><code>Stream&lt;List&lt;int&gt;&gt; stream = new File(filepath).openRead();
  stream
      .transform(UTF8.decoder)
      .transform(const LineSpilitter())
      .listen((line){
          // TODO: check if this is the last line of the file
          var isLastLine;
      });
  </code></pre>
  
  <p>I want to check whether the line in listen() is the last line of the file.</p>