title: '_InternalLinkedHashMap<String, dynamic>' is not a subtype of type 'List<dynamic>' in type cast
body: <p>I have been at this one for hours and I can not figure out what I am doing wrong. I am requesting JSON from a remote server and trying to place it into a model. When I run the below code, I get Unhandled Exception: Exception: type '_InternalLinkedHashMap&lt;String, dynamic&gt;' is not a subtype of type 'List' in type cast.</p>
  <p>Here is the JSON response:</p>
  <pre><code>{
      &quot;status&quot;: 200,
      &quot;data&quot;: {
          &quot;name&quot;: &quot;Radio Data&quot;,
          &quot;month&quot;: &quot;Jan 2022&quot;,
          &quot;data&quot;: [
              {
                  &quot;client_id&quot;: 172064,
                  &quot;client_name&quot;: &quot;Company LLC&quot;,
                  &quot;value&quot;: 150
              },
              {
                  &quot;client_id&quot;: 202947,
                  &quot;client_name&quot;: &quot;Communications&quot;,
                  &quot;value&quot;: 150
              },
              {
                  &quot;client_id&quot;: 200608,
                  &quot;client_name&quot;: &quot;Broadcasting Company&quot;,
                  &quot;value&quot;: 150
              },
              {
                  &quot;client_id&quot;: 204702,
                  &quot;client_name&quot;: &quot;Broadcasting Group&quot;,
                  &quot;value&quot;: 75
              },
              {
                  &quot;client_id&quot;: 202207,
                  &quot;client_name&quot;: &quot;Broadcasting Company Inc.&quot;,
                  &quot;value&quot;: 150
              },
              {
                  &quot;client_id&quot;: 199586,
                  &quot;client_name&quot;: &quot;Western College&quot;,
                  &quot;value&quot;: 300
              }
          ]
      }
  }
  
  </code></pre>
  <p>This is the OnAir model</p>
  <pre><code>class OnAir {
    String? name;
    String? month;
    List&lt;Data&gt;? data;
  
    OnAir({required this.name, required this.month, required this.data});
  
    OnAir.fromJson(Map&lt;String, dynamic&gt; json) {
      name = json['name'];
      month = json['month'];
      if (json['data'] != null) {
        data = &lt;Data&gt;[];
        json['data'].forEach((v) {
          data?.add(Data.fromJson(v));
        });
      }
    }
  
    Map&lt;String, dynamic&gt; toJson() {
      final Map&lt;String, dynamic&gt; data = &lt;String, dynamic&gt;{};
      data['name'] = name;
      data['month'] = month;
      data['data'] = this.data?.map((v) =&gt; v.toJson()).toList();
      return data;
    }
  }
  
  class Data {
    int? clientId;
    String? clientName;
    int? value;
  
    Data({required this.clientId, required this.clientName, required this.value});
  
    Data.fromJson(Map&lt;String, dynamic&gt; json) {
      clientId = json['client_id'];
      clientName = json['client_name'];
      value = json['value'];
    }
  
    Map&lt;String, dynamic&gt; toJson() {
      final Map&lt;String, dynamic&gt; data = &lt;String, dynamic&gt;{};
      data['client_id'] = clientId;
      data['client_name'] = clientName;
      data['value'] = value;
      return data;
    }
  }
  
  </code></pre>
  <p>And this is the network call, which I call from another page, using FutureBuilder.</p>
  <pre><code>
  fetchOnAir(int id);
  
  </code></pre>
  <pre><code>
  List&lt;OnAir&gt; parseOnAir(String responseBody){
      var list = json.decode(responseBody);
      var listData = list['data'] as List&lt;dynamic&gt;;
      List&lt;OnAir&gt; onAir = listData.map((model) =&gt; OnAir.fromJson(model)).toList();
      return onAir;
  }
  
  Future&lt;List&lt;OnAir&gt;&gt; fetchOnAir(int id) async{
      final accessToken = await AuthService().getAccessToken();
      final url = AuthService().getServiceUrl() + 'userOnAir?id=$id&amp;access_token=$accessToken';
      final response = await http.get(Uri.parse(url));
      if(response.statusCode == 200){
          return compute(parseOnAir, response.body);
      }else{
          throw Exception('Request API Error');
      }
  }
  
  </code></pre>
  <p>Any guidance would be truly appreciated.</p>