title: Flutter retrofit DioError [DioErrorType.other]: Expected a value of type 'List<dynamic>?', but got one of type 'String'
body: <p>My response  json is bellow</p>
  <pre><code>[
  {
    &quot;cat_id&quot;:&quot;517&quot;,
    &quot;categoryName&quot;:&quot;Pizza&quot;,
    &quot;item&quot; : [
      {
       &quot;itemId&quot; : &quot;1&quot;,
       &quot;name&quot;: &quot;Pizza 1&quot;,
       &quot;price&quot;: 50
      },
      {
       &quot;itemId&quot;:&quot;2&quot;,
       &quot;name&quot; :&quot;Pizza 2&quot;,
       &quot;price&quot;: 40
      }
    ]
  },
  {
  &quot;cat_id&quot;:&quot;518&quot;,
    &quot;categoryName&quot;:&quot;Burger&quot;,
    &quot;item&quot; : [
      {
       &quot;itemId&quot; : &quot;1&quot;,
       &quot;name&quot;: &quot;Burger 1&quot;,
       &quot;price&quot;: 10
      },
      {
       &quot;itemId&quot;:&quot;2&quot;,
       &quot;name&quot; :&quot;Burger 2&quot;,
       &quot;price&quot;: 30
      }
    ]
    }
   ]
  </code></pre>
  <p>I have use retrofit like bellow</p>
  <pre><code>@RestApi(baseUrl: &quot;https://raw.githubusercontent.com/&quot;)
  abstract class RestClient {
    factory RestClient(Dio dio) = _RestClient;
  
    @GET(&quot;enamul95/categoryshop/main/lib/util/items.json&quot;)
    Future&lt;List&lt;ProductMoel&gt;&gt; getProductItemst();
  }
  
  @JsonSerializable()
  class ProductMoel {
    String categoryName;
    @JsonKey(name: 'item')
    List&lt;Items&gt; item;
    ProductMoel(this.categoryName, this.item);
  
    factory ProductMoel.fromJson(Map&lt;String, dynamic&gt; json) =&gt;
        _$ProductMoelFromJson(json);
  
    Map&lt;String, dynamic&gt; toJson() =&gt; _$ProductMoelToJson(this);
  }
  
  @JsonSerializable()
  class Items extends Object {
    String itemId;
    String name;
     int price;
  
    Items(this.itemId, this.name,this.price);
  
    factory Items.fromJson(Map&lt;String, dynamic&gt; json) =&gt; _$ItemsFromJson(json);
  
    Map&lt;String, dynamic&gt; toJson() =&gt; _$ItemsToJson(this);
  }
  
  
      @JsonSerializable()
      class Items extends Object {
        String itemId;
        String name;
        // int price;
  
        Items(this.itemId, this.name);
  
        factory Items.fromJson(Map&lt;String, dynamic&gt; json) =&gt; _$ItemsFromJson(json);
  
        Map&lt;String, dynamic&gt; toJson() =&gt; _$ItemsToJson(this);
      }
  </code></pre>
  <p>I called from here like bellow</p>
  <pre><code>void getResutrantList(BuildContext context) async {    
  final client =  RestClient(Dio(BaseOptions(contentType: &quot;application/json&quot;)));
  client.getProductItemst().then((it) {     
    print(it);      
  }).catchError((error, stackTrace) {     
    print(&quot;inner  **********************: $error&quot;);
  });
  }
  </code></pre>
  <p>What is the problem of my code.Please help me..</p>