title: Dart code acts differently in my Flutter application. List<dynamic>' is not a subtype of type 'List<Map<String, dynamic>>
body: <p>When I run this in a "Dart" main, everything works, and I get a List of attendees.  However, when I call it within my Flutter application, I get the error:</p>
  
  <p>flutter: type 'List' is not a subtype of type 'List>'</p>
  
  <p>I have been round and round with the "not a subtype" error in Dart, and I finally was able to get all of the casts correct for my json data that is coming from a REST interface.  </p>
  
  <p>Can someone tell me, why is it bombing in Flutter but not in Dart?  How do I resolve this?</p>
  
  <pre><code>Future&lt;List&lt;Attendee&gt;&gt; callLogin() async {
  return http.get(
          "http://www.somesite.com")
      .then((response) {
    try {
      List&lt;Attendee&gt; l = new List();
      final List&lt;Map&lt;String, dynamic&gt;&gt; responseJson =
          json.decode(response.body)['attendees'];
      responseJson.forEach((f) =&gt; l.add(new Attendee.fromJson(f)));
      return l;
    } catch (e) {
      print(e);  // Just print the error, for SO
    }
  });
  </code></pre>
  
  <p>}</p>
  
  <pre><code>class Attendee {
    String nameFirst;
    String nameLast;
    String company;
    ...
  factory Attendee.fromJson(Map&lt;String, dynamic&gt; json) {
    return new Attendee(
      nameLast: json['nameLast'],
      nameFirst: json['tnameFirst'],
      company: json['company'],
      city: json['city'],
      state: json['state'],
      country: json['country'],
    );
  }
  
  
  class AttendeeSearch extends StatefulWidget {
    AttendeeSearch({Key key, this.title}) : super(key: key);
    final String title;
  
    @override
    _AttendeeSearchPageState createState() =&gt; new 
    _AttendeeSearchPageState();
  }
  
  class _AttendeeSearchPageState extends State&lt;AttendeeSearch&gt; {
  
    String search;
  
    final _suggestions = new List&lt;Attendee&gt;();
    final _smallerFont = const TextStyle(fontSize: 12.0);
    final formKey = new GlobalKey&lt;FormState&gt;();
  
    void _submit() {
      final form = formKey.currentState;
      if (form.validate()) {
        form.save();
      }
      AttendeeSummaryRequest asr = new AttendeeSummaryRequest();
      setState(() {
        asr.callLogin().then((item) { // Calling WebService
        setState(() {
          _suggestions.addAll(item);  
        });
      });
    });
  }
  </code></pre>