title: Unhandled Exception: type '_InternalLinkedHashMap<String, dynamic>' is not a subtype of type 'String'
body: <p>im trying to parse json, print it to console, and put into ListView.builder  and get this error : type '_InternalLinkedHashMap&lt;String, dynamic&gt;' is not a subtype of type 'String'</p>
  <p>how do i fix it?</p>
  <p>list data</p>
  <pre><code>FutureBuilder(
    future: restaurantSearch,
    builder: (context, AsyncSnapshot&lt;RestaurantSearch&gt; snapshot) {
      if(snapshot.connectionState == ConnectionState.waiting) {
        return Expanded(child: Center(child: CircularProgressIndicator(strokeWidth: 3)));
      } else if(snapshot.connectionState == ConnectionState.done) {
        if(snapshot.hasData) {
          return ListView.builder(
            shrinkWrap: true,
            itemCount: snapshot.data.restaurants.length,
            itemBuilder: (context, index) {
              var restaurant = snapshot.data.restaurants[index];
              return ListTile(
                title:Text(restaurant.name),
              );
            }
          );
        }
      } else if (snapshot.hasError) {
          return Center(child: Text(snapshot.error.toString()));
      }
      return Text('');
    }
  )
  </code></pre>
  <p>apiServices</p>
  <pre><code>Future&lt;RestaurantSearch&gt; restaurantSearch(String query) async {
      final response = await dio.get(&quot;https://restaurant-api.dicoding.dev/search&quot;, queryParameters: {&quot;q&quot;: query});
      print(response.data);
      if(response.statusCode == 200) {
        return RestaurantSearch.fromJson(json.decode(response.data));
      } else {
        throw Exception(&quot;Failed to Load Detail Restaurant, Please Check Your Internet&quot;);
      }
    }
  </code></pre>
  <p>model</p>
  <pre><code>import 'dart:convert';
  
  RestaurantSearch restaurantSearchFromJson(String str) =&gt; RestaurantSearch.fromJson(json.decode(str));
  
  String restaurantSearchToJson(RestaurantSearch data) =&gt; json.encode(data.toJson());
  
  class RestaurantSearch {
    RestaurantSearch({
      this.error,
      this.founded,
      this.restaurants,
    });
  
    bool error;
    int founded;
    List&lt;RestaurantS&gt; restaurants;
  
    factory RestaurantSearch.fromJson(Map&lt;String, dynamic&gt; json) =&gt; RestaurantSearch(
      error: json[&quot;error&quot;],
      founded: json[&quot;founded&quot;],
      restaurants: List&lt;RestaurantS&gt;.from(json[&quot;restaurants&quot;].map((x) =&gt; RestaurantS.fromJson(x))),
    );
  
    Map&lt;String, dynamic&gt; toJson() =&gt; {
      &quot;error&quot;: error,
      &quot;founded&quot;: founded,
      &quot;restaurants&quot;: List&lt;String&gt;.from(restaurants.map((x) =&gt; x.toJson())),
    };
  }
  
  class RestaurantS {
    RestaurantS({
      this.id,
      this.name,
      this.description,
      this.pictureId,
      this.city,
      this.rating,
    });
  
    String id;
    String name;
    String description;
    String pictureId;
    String city;
    double rating;
  
    factory RestaurantS.fromJson(Map&lt;String, dynamic&gt; json) =&gt; RestaurantS(
      id: json[&quot;id&quot;],
      name: json[&quot;name&quot;],
      description: json[&quot;description&quot;],
      pictureId: json[&quot;pictureId&quot;],
      city: json[&quot;city&quot;],
      rating: json[&quot;rating&quot;].toDouble(),
    );
  
    Map&lt;String, dynamic&gt; toJson() =&gt; {
      &quot;id&quot;: id,
      &quot;name&quot;: name,
      &quot;description&quot;: description,
      &quot;pictureId&quot;: pictureId,
      &quot;city&quot;: city,
      &quot;rating&quot;: rating,
    };
  }
  </code></pre>
  <p>thank you very much for your answer.........................................................................................................................................................................................................................................</p>