title: Check whether there is an Internet connection available on Flutter app
body: <p>I have a network call to be executed. But before doing that I need to check whether the device have internet connectivity.</p>
  
  <p>This is what i have done so far:</p>
  
  <pre><code>  var connectivityResult = new Connectivity().checkConnectivity();// User defined class
      if (connectivityResult == ConnectivityResult.mobile ||
          connectivityResult == ConnectivityResult.wifi) {*/
      this.getData();
      } else {
        neverSatisfied();
      }
  </code></pre>
  
  <p>Above method is not working.</p>