title: Data is not get loading from API in flutter. How can I fix it?
body: <p>I am calling API data and want to show it without using listview.builder in flutter but the error I am facing is that the data is not get loading and the loading indicator is active all the time.</p>
  <p>For Example, When I open my app the data get starts loading itself (as I am using future). but it always loads and data didn't get fetched from API.</p>
  <p>I am looking for someone who can help me to fix this issue?</p>
  <p>For this purpose here is myClass Code.</p>
  <pre><code>class _TestState extends State&lt;Test&gt; {
   Future&lt;List&lt;dynamic&gt;&gt; getLiveMatches() async {
   http.Response response = await http.get(
      Uri.parse(&quot;https://api.cricket.com.au/matches/2780/50837/live&quot;)
   );
   final Map parseData = await json.decode(response.body.toString());
   var matches  = parseData['liveMatch'];
   return matches;
   }
  
   @override
   Widget build(BuildContext context) {
   return Scaffold(
    body:  Padding(
      padding: EdgeInsets.only(left: 10, right: 10, top: 15),
      child: RefreshIndicator(
        color: Colors.white,
        backgroundColor: Colors.purple,
        strokeWidth: 5,
        onRefresh: ()async{
          getLiveMatches();
        },
        child: Container(
          height: double.infinity,
          decoration: BoxDecoration(
              borderRadius: BorderRadius.only(
                  topLeft: Radius.circular(6),
                  topRight: Radius.circular(6)
              ),
              color: Colors.white
          ),
          child: FutureBuilder&lt;List&lt;dynamic&gt;&gt;(
              future: getLiveMatches(),
              builder: (context, snapshot) {
                if (snapshot.hasData) {
                  List&lt;dynamic&gt; matches = snapshot.data;
                  print(matches);
                  return Column(
                    children: [
                      Text(matches.toString())
                    ],
                  );
                }
                return Center(
                    child: CupertinoActivityIndicator(
                        animating: true, radius: 10));
              }
          ),
        ),
        ),
        ),
       );
       }
       }
  </code></pre>