title: Dart: cannot convert List<dynamic> to List<Map<String, dynamic>> despite cast
body: <p>I am trying to parse data from a Rest API inside a Dart/Flutter application. The JSON contains a field called <code>data</code> at the root, which contains a list of <code>Word</code>s. I want to get a <code>List&lt;Word&gt;</code> from this JSON. I already have the following code:</p>
  <pre><code>Map&lt;String, dynamic&gt; jsonMap = json.decode(jsonString);
      
  List&lt;Word&gt; temp = jsonMap['data'] 
      .map((map) =&gt; map as Map&lt;String, dynamic&gt;)  
      .map((Map&lt;String, dynamic&gt; map) =&gt; Word.fromJson(map)).toList(); // map to List&lt;Word&gt;
  </code></pre>
  <p><code>Word.fromJson</code> has the following signature:</p>
  <pre><code>Word.fromJson(Map&lt;String, dynamic&gt; json)
  </code></pre>
  <p>The final call to <code>map</code> gives the following error:</p>
  <pre><code>type 'List&lt;dynamic&gt;' is not a subtype of type 'List&lt;Map&lt;String, dynamic&gt;&gt;'
  </code></pre>
  <p>From my understanding, the call to <code>map((map) =&gt; map as Map&lt;String, dynamic&gt;)</code> should convert the <code>List&lt;dynamic&gt;</code> to a <code>List&lt;Map&lt;String, dynamic&gt;&gt;</code>, so I am confused as to why I get the error.</p>
  <p>Any advice appreciated.</p>