title: Retry Http Get request if there is no response in Flutter
body: <pre><code>getData() async {
      http.Response response = await http.get('https://www.example.com/);
      print(response.body);
  }
  </code></pre>
  
  <p>The above function works to get the HTML code of a page but it fails in some cases. The function is sometimes never completed and it waits forever to get response( For example, if the app is opened while internet is off and even when its turned on, it never connects). In such situations is there any way to retry ?</p>
  
  <p>I tried the http retry package but it gives me 15+ errors.</p>