title: Fixed-error: How to Solve The return type 'StreamController<ConnectivityStatus>' isn't a 'Stream', as defined by anonymous closure error
body: <p>I was following the below tutorial for connectivity status based on internet connection.</p>
  
  <p>link : <a href="https://www.filledstacks.com/post/make-your-flutter-app-network-aware-using-provider-and-connectivity-status/" rel="noreferrer">https://www.filledstacks.com/post/make-your-flutter-app-network-aware-using-provider-and-connectivity-status/</a></p>
  
  <p>now the issue is, then i am trying to implement the code. at the end of the process where i am using StreamProvider, in builder i am getting this error of:</p>
  
  <p>error: The return type 'StreamController' isn't a 'Stream', as defined by anonymous closure.</p>
  
  <p>CODE IS AS FOLLOWED:
  main.dart</p>
  
  <pre><code>@override
    Widget build(BuildContext context) {
        return StreamProvider(
          builder:  (context) =&gt; ConnectivityService().connectionStatusController, // ERROR LINE
          child: ChangeNotifierProvider&lt;ThemeChanger&gt;(
            builder: (_) =&gt; ThemeChanger((x) ? ThemeChanger.customDarkTheme : ThemeChanger.customLightTheme),
            child: new MaterialAppWithTheme(),
          ),
        );
    }
  }
  
  </code></pre>
  
  <p>completely replacing my type code with the authors git code, link below:
  <a href="https://github.com/FilledStacks/flutter-tutorials/tree/master/011-network-sensitive-ui/" rel="noreferrer">https://github.com/FilledStacks/flutter-tutorials/tree/master/011-network-sensitive-ui/</a></p>
  
  <p>i tried google search but no use for my case. what is going wrong in my code ? is it because i am using another provider ?</p>
  
  <hr>
  
  <p><strong>UPDATED ANSWER AS SOLUTION FOUND BY SELF DISCOVERY</strong></p>
  
  <hr>
  
  <pre><code>@override
    Widget build(BuildContext context) {
        return StreamProvider(
          builder:  (context) =&gt; ConnectivityService().connectionStatusController.stream, // add .stream at end
          child: ChangeNotifierProvider&lt;ThemeChanger&gt;(
            builder: (_) =&gt; ThemeChanger((x) ? ThemeChanger.customDarkTheme : ThemeChanger.customLightTheme),
            child: new MaterialAppWithTheme(),
          ),
        );
    }
  }
  </code></pre>
  
  <p>I think their was an update to the package from the time the Tutorial was published and so as i was going through lots of article i picked up a keyword stream Controller, did RND on it and then move to Stream Provider and did some more RND on this and when doing it saw sink and stream in one of other tutorial but as i was way more ahead in code and efficient due to this tutorial. i just added stream at the end with period and voila ! problem solved.</p>
  
  <p>I hope people will be able to find this solution ready to go for their app :) </p>