title: How do I check Internet Connectivity using HTTP requests(Flutter/Dart)?
body: <p>This is probably a noob question, but how do I make my response throw an exception if the user does not have an internet connection or if it takes too long to fetch the data? </p>
  
  <pre><code>Future&lt;TransactionModel&gt; getDetailedTransaction(String crypto) async {
  //TODO Make it return an error if there is no internet or takes too long!
  
   http.Response response = await http.get(crypto);
  
    return parsedJson(response);
  
     }
  </code></pre>