title: How do I use a StreamProvider from a StateNotifierProvider?
body: <p>I am try to use a StreamProvider from a StateNotifierProvider.</p>
  <p>Here is my StreamProvider, which works fine so far.</p>
  <pre><code>final productListStreamProvider = StreamProvider.autoDispose&lt;List&lt;ProductModel&gt;&gt;((ref) {
    CollectionReference ref = FirebaseFirestore.instance.collection('products');
    return ref.snapshots().map((snapshot) {
      final list = snapshot.docs
          .map((document) =&gt; ProductModel.fromSnapshot(document))
          .toList();
      return list;
    });
  });
  </code></pre>
  <p>Now I am trying to populate my shopping cart to have all the products in it from scratch.</p>
  <pre><code>final cartRiverpodProvider = StateNotifierProvider((ref) =&gt; 
  new CartRiverpod(ref.watch(productListStreamProvider));
  </code></pre>
  <p>This is my CartRiverPod StateNotifier</p>
  <pre><code>class CartRiverpod extends StateNotifier&lt;List&lt;CartItemModel&gt;&gt; {
  
    CartRiverpod([List&lt;CartItemModel&gt; products]) : super(products ?? []);
  
    void add(ProductModel product) {
      state = [...state, new CartItemModel(product:product)];
      print (&quot;added&quot;);
    }
  
    void remove(String id) {
      state = state.where((product) =&gt; product.id != id).toList();
    }
  }
  </code></pre>