title: Loading multiple streams in StringBuilder, one stream after the other
body: <p>I am new to Dart Streams, and having a hard time figuring this out. </p>
  
  <p>Basically, I have a stream for file download, then another stream for file processing. The file download stream can only be initialized after the file processing stream, because it depends on the file downloaded.</p>
  
  <p>I need to display a progress widget going from 0 to 100%, and then again from 0 to 100%.</p>
  
  <p>I tried using rxDart concatWith, to merge the streams, but it's not working. The ConnectionState.done is called on the first stream, and it doesn't listen to the other one. I am also not sure if this is the right way to go about it.</p>
  
  <p>If I tried to do set the new stream in the builder, I would get this error:</p>
  
  <blockquote>
    <p>setState() or markNeedsBuild() called during build.</p>
  </blockquote>
  
  <pre><code>builder: (context, snapshot) {
        print(snapshot.connectionState);
  
        if (snapshot.connectionState == ConnectionState.done) {
          setState(() {
            stream =
                Stream.periodic(Duration(seconds: 1), (i) =&gt; _source2[i]).take(_source2.length); // New Stream
          });
        }
  </code></pre>
  
  <p>What is a good approach for doing this?  </p>