title: Flutter stream doesn't listen or detect change
body: <p>I have problem, i have 3 dart files,</p>
  <p>home.dart contain button with onclick:</p>
  <pre><code>final cartEmiter = CartEmitter();
  cartEmiter.emitCart(&quot;add_cart&quot;);
  </code></pre>
  <p>cart.dart contain:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>class CartEmitter {
    StreamController _controller = StreamController.broadcast();
    void emitCart(action) {
      _controller.add(action);
      // print(action);
    }
  
    Stream get cartAction =&gt; _controller.stream;
  }</code></pre>
  </div>
  </div>
  </p>
  <p>and in main.dart I have this code to change the cart badge.</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>StreamSubscription _cartCountSubscribtion;
  
  int _cartCount = 0;
  
  @override
    void initState() {
      _cartCountSubscribtion = CartEmitter().cartAction.listen((action) {
        print(action);
        setState(() {
           _cartCount++;
        });
      });
      super.initState();
    }
  
    @override
    void dispose() {
      _cartCountSubscribtion.cancel();
      super.dispose();
    }</code></pre>
  </div>
  </div>
  </p>
  <p>But it doesn't work, no error, no output printed.
  Is my code wrong or how to listen to change?</p>