title: Flutter 'Unhandled Exception: type 'List<dynamic>' is not a subtype of type 'List<class>'
body: <p>I'm getting data from an API and i'm trying to push that data into two variables. I can access part of the data being returned but not all of it, I can print all of the data but when I try to access a specific part of it, it doesn't work.</p>
  <p>E.G:
  res = response from API</p>
  <pre><code>print(res.data); // This works
  print(res.feeds); // This doesn't work
  print(res.feeds.id); // This doesn't work
  </code></pre>
  <p>The error I am getting is:</p>
  <pre><code>'Unhandled Exception: type 'List&lt;dynamic&gt;' is not a subtype of type 'List&lt;FeedItem&gt;'
  </code></pre>
  <p>This is how i'm converting and reading the data:</p>
  <pre><code>class FeedData {
    String data;
    List&lt;FeedItem&gt; feeds;
  
    FeedData({this.data, this.feeds});
  
    factory FeedData.fromJson(Map&lt;String, dynamic&gt; json) {
      return FeedData(
        data: json['data'],
        feeds: json['feeds'],
      );
    }
  }
  </code></pre>
  <p>I can read and access the 'data' but not the 'feeds' which is my problem, I need to be able to access the data in the 'feeds'
  The 'FeedItem' class is built in the same way as the 'FeedData' class so I'm sure that it is built properly</p>
  <p>This is how I'm calling the data:</p>
  <pre><code>getUserFeed() async {
      FeedData res = FeedData.fromJson(
          await requests.get(url: 'feeds/u?u=jxchumber&amp;PageNumber=1'));
      print(res.data);
      // res.data works
      print(res.feeds);
      // res.feeds doesn't work
    }
  </code></pre>
  <p>This is the data being returned from the API:</p>
  <pre><code>{
      &quot;data&quot;: &quot;default&quot;,
      &quot;feeds&quot;: [
          {
              &quot;id&quot;: 2,
              &quot;photoUrl&quot;: &quot;https://cartalkio-image-storage-dev.s3.eu-west-2.amazonaws.com/o85DvOaTXXE.jpg&quot;,
              &quot;description&quot;: &quot;Magna duis consectetur sit ut commodo non eiusmod.&quot;,
              &quot;dateAdded&quot;: &quot;0001-01-01T00:00:00&quot;,
              &quot;isMain&quot;: false,
              &quot;publicId&quot;: null,
              &quot;isImage&quot;: true,
              &quot;mainImage&quot;: &quot;https://randomuser.me/api/portraits/men/76.jpg&quot;,
              &quot;userId&quot;: 9,
              &quot;likers&quot;: null,
              &quot;username&quot;: &quot;Larsen&quot;,
              &quot;thumbnail&quot;: null,
              &quot;likes&quot;: 0
          },
          {
              &quot;id&quot;: 4,
              &quot;photoUrl&quot;: &quot;https://cartalkio-image-storage-dev.s3.eu-west-2.amazonaws.com/lXR833PRh3g.jpg&quot;,
              &quot;description&quot;: &quot;Magna duis consectetur sit ut commodo non eiusmod.&quot;,
              &quot;dateAdded&quot;: &quot;0001-01-01T00:00:00&quot;,
              &quot;isMain&quot;: false,
              &quot;publicId&quot;: null,
              &quot;isImage&quot;: true,
              &quot;mainImage&quot;: &quot;https://randomuser.me/api/portraits/men/4.jpg&quot;,
              &quot;userId&quot;: 8,
              &quot;likers&quot;: null,
              &quot;username&quot;: &quot;Lloyd&quot;,
              &quot;thumbnail&quot;: null,
              &quot;likes&quot;: 0
          },
  }
  </code></pre>