title: StreamProvider not updating state
body: <p>I am trying to use a <code>StreamProvider</code> (from <a href="https://github.com/rrousselGit/provider" rel="noreferrer">this</a> awesome package), but I've been struggling to get a particular stream to work.     </p>
  
  <p>I create a <code>StreamController</code> which I use to add data to its <code>Stream</code> via its <code>Sink</code>. All of this seems to be working fine. But when using this <code>Stream</code> with a <code>StreamProvider</code>, the widget tree does not reflect the changes of the <code>Stream</code>. It does however work fine using a <code>StreamBuilder</code>.    </p>
  
  <p>The code using a <code>StreamProvider</code>:</p>
  
  <pre><code>class TestPage extends StatelessWidget {
    final Mockup exchange = ExchangeApi.mockup;
  
    @override
    Widget build(BuildContext context) {
      return StreamProvider&lt;List&lt;Data&gt;&gt;(
        builder: (BuildContext context) =&gt; Wrapper.mockup.stream,
        initialData: null,
        catchError: (BuildContext context, e) {
          print("Error: $e");
          return null;
        },
        child: TestPageBody(),
      );
    }
  }
  
  class TestPageBody extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      List&lt;Data&gt; dataList = Provider.of&lt;List&lt;Data&gt;&gt;(context);
      return ListView.builder(
        itemCount: dataList?.length ?? 0,
        itemBuilder: (BuildContext context, int index) {
          return Text(dataList[index].name);
        },
      );
    }
  }
  </code></pre>
  
  <p>I have been searching why this does not work, but haven't found an answer yet. But here are some things I did find:</p>
  
  <ul>
  <li>Using Flutter Desktop Embedding, the UI did reflect changes from the stream when the window got resized (thus forcing to rebuild). The same effect is seen when using hot refresh.</li>
  <li>The stream is constantly adding new data, I tested this by debugging and simply printing out the data</li>
  </ul>
  
  <p>Any help would be greatly appreciated!</p>