title: my snapshot doesn't have the data in futurebuilder
body: <p>pls, help if you can .i am trying to fetch some data from rest api .but on the getTreadingWallpapers() method it shows me full json data. but  whenever I print snapshot.hasError on else condition.. it shows me false. it means the snapshot has not error..but why i am not getting the data in my future builder. no error showing , how can i  solve this problem</p>
  <pre><code>     class _FrontPageState extends State&lt;FrontPage&gt; {
   Future&lt;List&lt;RecentPage&gt;&gt; recentPage;
    RecentPage recentPagee;
    bool isLoading = true;
    List&lt;RecentPage&gt; wallpapers = new List();
  
  
    Future&lt;List&lt;RecentPage&gt;&gt; getTrendingWallpapers() async {
     // final url =&quot;http://wallpaper.pkappstudio.info/api/api.php?action=get_recent&quot;;
      String url = 'http://wallpaper.pkappstudio.info/api/api.php?action=get_recent';
      final response =
      await Http.get(url, headers: {&quot;Accept&quot;: &quot;application/json&quot;});
      if (response.statusCode == 200) {
  
        final Map = jsonDecode(response.body);
        print(&quot;${response.body}&quot;);
        isLoading = false;
  
        final recentPaget = recentPageFromJson(response.body).asMap();
  
        recentPaget.entries.forEach((element) =&gt; wallpapers.add(element.value));
  
        return wallpapers;
      } else {
        throw Exception('Failed to load post');
      }
  
  
    }
  
    @override
    void initState() {
      // TODO: implement initState
      recentPage = getTrendingWallpapers();
      super.initState();
    }
    @override
    Widget build(BuildContext context) {
      return Scaffold(
          backgroundColor: Colors.white,
          appBar: AppBar(title: brandName(),elevation: 0.0,),
          body: FutureBuilder(
            future: recentPage,
            builder: (context, snapshot) {
              if (snapshot.connectionState == ConnectionState.none &amp;&amp;
                  snapshot.hasData == null) {
               print('project snapshot data is: ${snapshot.data}');
                return isLoading? Center(child: Container(child: Text(&quot;container&quot;),)):Center(child: Container(child: Text(&quot;csdsdontainer&quot;),));
              }
              if(snapshot.hasData){
                return isLoading? Center(child: CircularProgressIndicator()):ListView.builder(
                  itemCount: snapshot.data.length,
                  itemBuilder: (context, index){
                    return Container(
                      padding: EdgeInsets.symmetric(horizontal: 16),
  
                      child: GridView.count(
                        shrinkWrap: true,
                        crossAxisCount: 2,
                        physics: ClampingScrollPhysics(),
                        childAspectRatio: 0.6,
                        mainAxisSpacing: 6.0,
                        crossAxisSpacing: 6.0,
                        children: wallpapers.map((wallpapers){
                          return GridTile(child: GestureDetector(
                            onTap: (){
                              //            Navigator.push(context, MaterialPageRoute(builder: (context)=&gt;ImageView(
                              //              imageUrl: wallpapers.src.potrait,
                              //            )));
                            },
                            child: Container(
                              child:  ClipRRect(
                                borderRadius: BorderRadius.circular(10),
                                child:Image.network(snapshot.data.imageUrl, fit: BoxFit.cover,),
                              ),
                            ),
  
                          ));
                        }).toList(),
                      ),
  
                    );
                  },
                );
              } else return Container(child: Text(&quot;${snapshot.hasError}&quot;),);
  
  
            },
          )
  
  
      );
    }
  }
  </code></pre>