title: The following NoSuchMethodError was thrown building FutureBuilder<List<Data>>(dirty, state: _FutureBuilderState<List<Data>>#d53db)
body: <p>I can't seem to figure this out so please if anyone could help me out I'm kinda stuck at this!</p>
  <pre><code>import 'dart:async';
  import 'dart:convert';
  import 'package:http/http.dart' as HTTP;
  import 'package:flutter/material.dart';
  import 'package:coding/Data.dart';
  
  
  void main()=&gt;
  runApp(new MaterialApp(
    home: MyApp(),
    debugShowCheckedModeBanner: false,
  ));
  class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() =&gt; _MyAppState();
  }
  
  class _MyAppState extends State&lt;MyApp&gt; {
  @override
  Widget build(BuildContext context) {
  try {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Colors.transparent,
        actions: [new IconButton(icon: Icon(Icons.arrow_back_ios), onPressed: (){}),],
      ),
      body: ListView(
          children: &lt;Widget&gt;[
            new Container(
              height: 500.0,
              margin: EdgeInsets.all(7.0),
              child: new FutureBuilder(
                future: getAllData(),
                builder: (BuildContext c,AsyncSnapshot snapshot) {
                    return ListView.builder(
                      itemCount: snapshot.data.length,
                      itemBuilder: (BuildContext c,int index) {
                        return Card(
                          elevation: 10.0,
                          child: new Column(
                            children: &lt;Widget&gt;[
                              new Image.network(snapshot.data[index].link,
                                height: 150.0,
                                width: 150.0,
                                fit: BoxFit.cover,),
                            ],
                          ),
                        );
                      },);
                },
              ),
            ),
          ]
      ),
    );
  }
  catch (e){
  }
  }
  }
  Future&lt;List&lt;Data&gt;&gt; getAllData() async{
  var api=&quot;https://www.awanmart.com/wp-json/wp/v2/categories&quot;;
  var data=await http.get(api);
  
  var jsonData=json.decode(data.body);
  List&lt;Data&gt;listOf=[];
  
  for(var i in jsonData){
  Data data=new Data(i[&quot;id&quot;],i [&quot;count&quot;], i[&quot;description&quot;], i[&quot;link&quot;], i[&quot;name&quot;], i[&quot;slug&quot;],I 
  [&quot;taxonomy&quot;], i[&quot;parent&quot;],i [&quot;meta&quot;], i[&quot;_links&quot;], i[&quot;self&quot;], i[&quot;href&quot;], i[&quot;collection&quot;], 
  i[&quot;about&quot;], i[&quot;post_type&quot;], i[&quot;curies&quot;], i[&quot;templated&quot;]);
  }
  return jsonData;
  }
  </code></pre>
  <p>(This is My Debugconsole)</p>
  <pre><code>═╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════ The following NoSuchMethodError was thrown building FutureBuilder&lt;List&lt;Data&gt;&gt;(dirty, state:
  _FutureBuilderState&lt;List&lt;Data&gt;&gt;#d53db): The getter 'length' was called on null. Receiver: null Tried calling: length
  
  The relevant error-causing widget was:
    
  
   FutureBuilder&lt;List&lt;Data&gt;&gt; file:///D:/myappp/coding/lib/main.dart:32:28
  
  When the exception was thrown, this was the stack:
  #0      Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
  #1      _MyAppState.build.&lt;anonymous closure&gt; (package:coding/main.dart:36:50)
  #2      _FutureBuilderState.build (package:flutter/src/widgets/async.dart:740:55)
  #3      StatefulElement.build (package:flutter/src/widgets/framework.dart:4663:28)
  #4      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4546:15)
  #5      StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4719:11)
  #6      Element.rebuild (package:flutter/src/widgets/framework.dart:4262:5)
  #7      ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4525:5)
  #8      StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4710:11)
  #9      ComponentElement.mount (package:flutter/src/widgets/framework.dart:4520:5) ...     Normal element mounting (45 frames)
  #54     Element.inflateWidget (package:flutter/src/widgets/framework.dart:3490:14)
  #55     Element.updateChild (package:flutter/src/widgets/framework.dart:3258:18)
  #56     SliverMultiBoxAdaptorElement.updateChild (package:flutter/src/widgets/sliver.dart:1164:36)
  #57     SliverMultiBoxAdaptorElement.createChild.&lt;anonymous closure&gt; (package:flutter/src/widgets/sliver.dart:1149:20)
  #58     BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2620:19)
  #59     SliverMultiBoxAdaptorElement.createChild (package:flutter/src/widgets/sliver.dart:1142:11)
  #60     RenderSliverMultiBoxAdaptor._createOrObtainChild d.&lt;anonymous closure&gt; (package:flutter/src/rendering/sliver_multi_box_adaptor.dart:356:23)
  #61     RenderObject.invokeLayoutCallback.&lt;anonymous closure&gt; (package:flutter/src/rendering/object.dart:1868:58)
  #62     PipelineOwner._enableMutationsToDirtySubtrees (package:flutter/src/rendering/object.dart:920:15)
  #63     RenderObject.invokeLayoutCallback (package:flutter/src/rendering/object.dart:1868:13)
  #64     RenderSliverMultiBoxAdaptor._createOrObtainChild (package:flutter/src/rendering/sliver_multi_box_adaptor.dart:345:5)
  #65     RenderSliverMultiBoxAdaptor.addInitialChild (package:flutter/src/rendering/sliver_multi_box_adaptor.dart:429:5)
  #66     RenderSliverList.performLayout (package:flutter/src/rendering/sliver_list.dart:81:12)
  #67     RenderObject.layout (package:flutter/src/rendering/object.dart:1769:7)
  #68     RenderSliverEdgeInsetsPadding.performLayout (package:flutter/src/rendering/sliver_padding.dart:137:11)
  #69     RenderSliverPadding.performLayout (package:flutter/src/rendering/sliver_padding.dart:377:11)
  #70     RenderObject.layout (package:flutter/src/rendering/object.dart:1769:7)
  #71     RenderViewportBase.layoutChildSequence (package:flutter/src/rendering/viewport.dart:471:13)
  #72     RenderViewport._attemptLayout (package:flutter/src/rendering/viewport.dart:1465:12)
  #73     RenderViewport.performLayout (package:flutter/src/rendering/viewport.dart:1374:20)
  #74     RenderObject.layout (package:flutter/src/rendering/object.dart:1769:7)
  #75     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:115:13)
  #76     RenderObject.layout (package:flutter/src/rendering/object.dart:1769:7)
  #77     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:115:13)
  #78     RenderObject.layout (package:flutter/src/rendering/object.dart:1769:7)
  #79     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:115:13)
  #80     RenderObject.layout (package:flutter/src/rendering/object.dart:1769:7)
  #81     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:115:13)
  #82     RenderObject.layout (package:flutter/src/rendering/object.dart:1769:7)
  #83     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:115:13)
  #84     RenderObject.layout (package:flutter/src/rendering/object.dart:1769:7)
  #85     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:115:13)
  #86     RenderObject.layout (package:flutter/src/rendering/object.dart:1769:7)
  #87     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:115:13)
  #88     RenderObject.layout (package:flutter/src/rendering/object.dart:1769:7)
  #89     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:115:13)
  #90     RenderObject.layout (package:flutter/src/rendering/object.dart:1769:7)
  #91     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:115:13)
  #92     RenderObject.layout (package:flutter/src/rendering/object.dart:1769:7)
  #93     MultiChildLayoutDelegate.layoutChild (package:flutter/src/rendering/custom_layout.dart:173:11)
  #94     _ScaffoldLayout.performLayout (package:flutter/src/material/scaffold.dart:495:7)
  #95     MultiChildLayoutDelegate._callPerformLayout (package:flutter/src/rendering/custom_layout.dart:242:7)
  #96     RenderCustomMultiChildLayoutBox.performLayout (package:flutter/src/rendering/custom_layout.dart:401:14)
  #97     RenderObject.layout (package:flutter/src/rendering/object.dart:1769:7)
  #98     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:115:13)
  #99     RenderObject.layout (package:flutter/src/rendering/object.dart:1769:7)
  #100    RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:115:13)
  #101    _RenderCustomClip.performLayout (package:flutter/src/rendering/proxy_box.dart:1269:11)
  #102    RenderObject.layout (package:flutter/src/rendering/object.dart:1769:7)
  #103    RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:115:13)
  #104    RenderObject.layout (package:flutter/src/rendering/object.dart:1769:7)
  #105    RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:115:13)
  #106    RenderObject.layout (package:flutter/src/rendering/object.dart:1769:7)
  #107    RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:115:13)
  #108    RenderObject.layout (package:flutter/src/rendering/object.dart:1769:7)
  #109    RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:115:13)
  #110    RenderObject.layout (package:flutter/src/rendering/object.dart:1769:7)
  #111    RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:115:13)
  #112    RenderObject.layout (package:flutter/src/rendering/object.dart:1769:7)
  #113    RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:115:13)
  #114    RenderObject.layout (package:flutter/src/rendering/object.dart:1769:7)
  #115    RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:115:13)
  #116    RenderObject.layout (package:flutter/src/rendering/object.dart:1769:7)
  #117    RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:115:13)
  #118    RenderOffstage.performLayout (package:flutter/src/rendering/proxy_box.dart:3228:13)
  #119    RenderObject.layout (package:flutter/src/rendering/object.dart:1769:7)
  #120    RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:115:13)
  #121    RenderObject.layout (package:flutter/src/rendering/object.dart:1769:7)
  #122    _RenderTheatre.performLayout (package:flutter/src/widgets/overlay.dart:702:15)
  #123    RenderObject.layout (package:flutter/src/rendering/object.dart:1769:7)
  #124    RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:115:13)
  #125    RenderObject.layout (package:flutter/src/rendering/object.dart:1769:7)
  #126    RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:115:13)
  #127    RenderObject.layout (package:flutter/src/rendering/object.dart:1769:7)
  #128    RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:115:13)
  #129    RenderObject.layout (package:flutter/src/rendering/object.dart:1769:7)
  #130    RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:115:13)
  #131    RenderObject.layout (package:flutter/src/rendering/object.dart:1769:7)
  #132    RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:115:13)
  #133    RenderObject.layout (package:flutter/src/rendering/object.dart:1769:7)
  #134    RenderView.performLayout (package:flutter/src/rendering/view.dart:170:13)
  #135    RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:1632:7)
  #136    PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:889:18)
  #137    RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:404:19)
  #138    WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:867:13)
  #139    RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:286:5)
  #140    SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1117:15)
  #141    SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1056:9)
  #142    SchedulerBinding.scheduleWarmUpFrame.&lt;anonymous closure&gt; (package:flutter/src/scheduler/binding.dart:865:7) (elided 11 frames from class _RawReceivePortImpl, class _Timer, dart:async, and dart:async-patch)
  
  ═════════════════════════════════════════════════════════
  </code></pre>