title: Not able to reload page by using Refresh Indicator in my flutter project
body: <p><a href="https://i.stack.imgur.com/Vr2vk.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Vr2vk.jpg" alt="All these nodes data are updated everytime after fetch method is called"></a>> i am making a app that uses http get request to fetch data from server</p>
  
  <blockquote>
    <p>i want to be able to refresh page by using refresh indicator widget
    whose refresh method calls my get request every time</p>
  </blockquote>
  
  <pre><code>     Future&lt;void&gt; fetch() async {
          const url = "https:*********.firebaseio.com/nodes.json";
          final response = await http.get(url);
          final extractedData = json.decode(response.body) as Map&lt;String, dynamic&gt;;
          List&lt;Node&gt; value = [];
          extractedData.forEach((key, v) {
            value.add(
                Node(cpu: v['cpu'], memory: v['memory'], isLeader: v['_isleader']));
            setState(() {
              _nodes = value;
            });
          });
        }
  
    void initState() {
      setState(() {
        _isLoading = true;
      });
      fetch().then((_) {
        setState(() {
          _isLoading = false;
        });
      });
      super.initState();
    }
  
  
      body: RefreshIndicator(
              onRefresh: fetch,
              child: _isLoading == true
                  ? Center(
                      child: CircularProgressIndicator(),
                    )
                  : Stack(
                      children: &lt;Widget&gt;[
                        Padding(
                          padding: EdgeInsets.all(10),
                          child: Align(
                            alignment: Alignment.bottomCenter,
                            child: Image.network(
                              "https://rendr.com.au/wp-content/uploads/2018/10/Website-Maintenance-Animation.gif",
                            ),
                          ),
                        ),
  </code></pre>