title: Making HTTP request to my localhost on flutter not working
body: <p>I am trying to get my data to show on my flutter app from a api (formatted in json) created by connecting mysql on node.js with express.</p>
  
  <p>i am running this error in android studio console</p>
  
  <pre><code>[VERBOSE-2:dart_error.cc(16)] Unhandled exception:
  type '_InternalLinkedHashMap&lt;String, dynamic&gt;' is not a subtype of type 
  'List&lt;dynamic&gt;'
  </code></pre>
  
  <p>the api currently looks like this </p>
  
  <pre><code>{
      "error": false,
          "data": [
             {
                "name": "conner",
                "age": 24
              },
              {
                "name": "andrew",
                "age": 20
              }
           ],
           "message": "Todos list."
           }
  </code></pre>
  
  <p>I am using this tutorial and just replaced his value "title" with mine "name", <a href="https://www.youtube.com/watch?v=-PRrdG163to" rel="nofollow noreferrer">https://www.youtube.com/watch?v=-PRrdG163to</a></p>
  
  <p>here is the code I'm running</p>
  
  <pre><code>import 'dart:async';
  import 'dart:convert';
  
  import 'package:flutter/material.dart';
  import 'package:http/http.dart' as http;
  
  void main() {
    runApp(new MaterialApp(
      home: new HomePage(),
    ));
  }
  
  class HomePage extends StatefulWidget {
    @override
    HomePageState createState() =&gt; new HomePageState();
  }
  class HomePageState extends State&lt;HomePage&gt; {
  
    Map&lt;String,dynamic&gt; data;
  
    Future&lt;String&gt; getData() async {
      var response = await http.get(
          Uri.encodeFull("http://10.1.0.109:8080/names"),
          headers: {
            "Accept": "application/json"
          }
      );
  
      this.setState(() {
        data = JSON.decode(response.body);
      });
      print (data[1]["data"]);
  
      return "Success!";
    }
  
    @override
    void initState() {
      super.initState();
      this.getData();
    }
  
    @override
    Widget build(BuildContext context) {
      return new Scaffold(
        appBar: new AppBar(
          title: new Text("Listviews"),
        ),
        body: new ListView.builder(
          itemCount: data == null ? 0 : data["data"].length,
          itemBuilder: (BuildContext context, int index) {
            return new Card(
              child: new Text(data[index]["data"]),
            );
          },
        ),
      );
    }
  }
  </code></pre>