title: HTTP Request List<dynamic> is not a subtype of Map<String,dynamic>
body: <p>I tried to do a http request on flutter, but at the request there is the message List is not a subtype of Map&lt;String,dynamic&gt; but when I change the code to a get a List there is the error Map&lt;String,dynamic&gt; is not a subtype of List.
  I have absolutly no idea what to do at this point.</p>
  <pre><code>Future&lt;Album&gt; fetchAlbum() async {
    final response = await http.get(
      Uri.https('***'),
      headers: {
        HttpHeaders.authorizationHeader:
            &quot;key ***&quot;
      },
    );
    if (response.statusCode == 200) {
      return Album.fromJson(jsonDecode(response.body));
    } else {
      throw Exception(
          'Failed to load data\n Response: ' + response.statusCode.toString());
    }
  }
  class Album {
    final String ascii;
    final String deviceId;
    final String raw;
    final String time;
    Album({this.ascii, this.deviceId, this.raw, this.time});
  
    factory Album.fromJson(Map&lt;String, dynamic&gt; json) {
      return Album(
        ascii: json['ASCII'],
        deviceId: json['device_id'],
        raw: json['raw'],
        time: json['time'],
      );}}
  void main() =&gt; runApp(MyApp());
  class MyApp extends StatefulWidget {
    MyApp({Key key}) : super(key: key);
    @override
    _MyAppState createState() =&gt; _MyAppState();
  }
  class _MyAppState extends State&lt;MyApp&gt; {
    Future&lt;Album&gt; futureAlbum;
    @override
    void initState() {
      super.initState();
      futureAlbum = fetchAlbum();}
    @override
    Widget build(BuildContext context) {
      return MaterialApp(
        title: 'Fetch Data Example',
        theme: ThemeData(
          primarySwatch: Colors.blue,),
        home: Scaffold(
          appBar: AppBar(
            title: Text('Fetch Data Example'),),
          body: Center(
            child: FutureBuilder&lt;Album&gt;(
              future: futureAlbum,
              builder: (context, snapshot) {
                if (snapshot.hasData) {
                  return Text(snapshot.data.ascii);
                } else if (snapshot.hasError) {
                  return Text(&quot;${snapshot.error}&quot;);
                }return CircularProgressIndicator();
              },),),),);}}
  </code></pre>