title: Flutter type '_InternalLinkedHashMap<String, dynamic>' is not a subtype of type 'Comparable<dynamic>'
body: <p>I am getting the following error :</p>
  <blockquote>
  <p>The following _TypeError was thrown building FutureBuilder(dirty, state: _FutureBuilderState#0e8bb):
  type '_InternalLinkedHashMap&lt;String, dynamic&gt;' is not a subtype of type 'Comparable'</p>
  </blockquote>
  <p>When what I am trying to do is to build a Listview using FutureBuilder from a local Json and then sort the items if user taps on menu to sort :</p>
  <pre><code>class _ResultScreenState extends State&lt;ResultScreen&gt; {
    List showData;
    var sortedData;
    bool byName = false;
    bool byRating = false;
  
    @override
    void initState() {
      // TODO: implement initState
      super.initState();
    }
  
    @override
    Widget build(BuildContext context) {
      return Stack(
        children: &lt;Widget&gt;[
          ConstrainedBox(
            constraints: const BoxConstraints.expand(),
            child: Image(
              fit: BoxFit.cover,
              image: AssetImage('assets/scuba.jpg'),
            ),
          ),
          Scaffold(
            appBar: AppBar(
              title: Text(&quot;Scuba Dive&quot;),
              actions: &lt;Widget&gt;[
                Padding(
                  padding: const EdgeInsets.all(8.0),
                  child: Center(child: Text(&quot;Sort By&quot;)),
                ),
                PopupMenuButton&lt;String&gt;(
                  icon: Icon(
                    Icons.sort,
                    size: 32,
                  ),
                  onSelected: choiceAction,
                  itemBuilder: (BuildContext context) {
                    return Constants.choices.map((String choice) {
                      return PopupMenuItem&lt;String&gt;(
                        value: choice,
                        child: Text(choice),
                      );
                    }).toList();
                  },
                )
              ],
            ),
            body: Container(
              constraints: BoxConstraints.expand(),
              decoration: BoxDecoration(
                  image: DecorationImage(
                      image: AssetImage('assets/scuba.jpg'),
                      colorFilter:
                          ColorFilter.mode(Colors.black26, BlendMode.darken),
                      fit: BoxFit.cover)),
              child: FutureBuilder(
                builder: (context, snapshot) {
                  showData = json.decode(snapshot.data.toString());
  
                  if (byName) {
                    showData.sort();
                  }
  
                  return ListView.builder(
                    itemBuilder: (BuildContext context, int index) {
                      return Container(
                        padding: EdgeInsets.all(8),
                        margin: EdgeInsets.all(12),
                        decoration: BoxDecoration(
                          borderRadius: BorderRadius.circular(8),
                          color: Colors.white70,
                        ),
                        child: Column(
                          children: &lt;Widget&gt;[
                            Row(
                              children: &lt;Widget&gt;[
                                ConstrainedBox(
                                  constraints: BoxConstraints(
                                    maxWidth: 150,
                                    maxHeight: 80,
                                  ),
                                  child: Image(
                                    image: AssetImage(showData[index][&quot;image&quot;]),
                                  ),
                                ),
                                Flexible(
                                  child: Padding(
                                    padding: const EdgeInsets.all(8.0),
                                    child: Column(
                                      crossAxisAlignment:
                                          CrossAxisAlignment.start,
                                      children: &lt;Widget&gt;[
                                        Text(
                                          showData[index][&quot;name&quot;].toString(),
                                          style: TextStyle(
                                              fontSize: 18,
                                              fontWeight: FontWeight.bold),
                                        ),
                                        Text(&quot;Rating : &quot; +
                                            showData[index][&quot;rating&quot;]),
                                      ],
                                    ),
                                  ),
                                ),
                              ],
                            ),
                          ],
                        ),
                      );
                    },
                    itemCount: showData == null ? 0 : showData.length,
                  );
                },
                future:
                    DefaultAssetBundle.of(context).loadString(&quot;assets/data.json&quot;),
              ),
            ),
          )
        ],
      );
    }
  
    void choiceAction(String choice) {
      if (choice == Constants.FirstItem) {
        setState(() {
          byName = true;
        });
      } else if (choice == Constants.SecondItem) {
        print(&quot;Second&quot;);
      }
    }
  }
  </code></pre>
  <p>What could be the reason and how can I fix it?</p>