title: Parsing JSON in Flutter results in NULL values of objects's fields
body: <p>I have a JSON file in the following structure:</p>
  
  <pre><code>[
   {
    "key1":"value1",
    "key2":"value2",
    "key3":"value3",
    "key4":"value4",
   },
   {
    "key1":"value1",
    "key2":"value2",
    "key3":"value3",
    "key4":"value4",
   }
  ]
  </code></pre>
  
  <p>which I get over an HTTP call. I try to parse this JSON into flutter objects. Therefore I wrote a class:</p>
  
  <pre><code>class Foo {
   List&lt;Model&gt; modelsAsJson;
  
   Foo({this.modelsAsJson});
  
   Foo.fromJson(List&lt;dynamic&gt; jsonData) {
    modelsAsJson = jsonData.map((listItem) =&gt; Model.fromJson(listItem)).toList();
    Foo(modelsAsJson: modelsAsJson);
   }
  }
  </code></pre>
  
  <p>And I also wrote another class for <code>Model</code>:</p>
  
  <pre><code>class Model {
   String value1;
   String value2;
   String value3;
   String value4;
  
   Model({this.value1, this.value2, this.value3, this.value4});
  
   Model.fromJson(Map&lt;String, dynamic&gt; json) {
    Model(value1: json['key1'], value2: json['key2'], value3: json['key3'], value4: json['key4'],);
   }
  
   Map&lt;String, dynamic&gt; toJson() =&gt; {
      'key1': value1,
      'key2': value2,
      'key3': value3,
      'key4': value4
    };
  }
  </code></pre>
  
  <p>After getting the data over HTTP I parse it into the given objects like that:
      http.Response = http.get(urlHere);
      final decodedJson = jsonDecode(response.body);
      result = Foo.fromJson(decodedJson).modelsAsJson;</p>
  
  <p>After parsing the result gets the correct length from <code>modelsAsJson</code> but every <code>model</code> in that list hast value1..value4 being <code>null</code>s. What am I doing wrong?</p>