title: flutter parsing JSON from firebase
body: <p>I just started learning about flutter and try to use ScopedModel
  and I get stuck at parsing JSON,
  everything works until I try to get List of detail simulation but everything that I try just fails</p>
  
  <p>this is my class for project and simulation</p>
  
  <pre><code> class Project {
    String idProject;
   List images;
   List&lt;Simulations&gt; simulation;     
    Project({
      @required this.idProject,
      @required this.images,
      @required this.simulation
  
  });
  }
  
  class Simulations{
    String period;
    int profitProject;
    int roi;
  
    Simulations({
      @required this.period,
      @required this.profitProject,
      @required this.roi
  });
  
  }
  </code></pre>
  
  <p>I made a separate class to get detail for simulation</p>
  
  <p>this is a sample from JSON that I get from the firebase</p>
  
  <pre><code>{
      "1554182068913": {
  
          "idProject": "project id 1",
          "images": [
              1554181958565,
              1554181955542,
              1554181960876],
  
          "simulation": [
                  {
                  "periode": "year 1",
                  "profitProject": 300000,
                  "roi": 5,
                  "uniqueKey": "YyCWbHjvm"
                  }, 
  
                  {
                  "periode": "year 1",
                  "profitProject": 100000,
                  "roi": 3,
                  "uniqueKey": "CvyU4SjrX"
                  }, 
                  {
                  "periode": "year 1",
                  "profitProject": 2000000,
                  "roi": 10,
                  "uniqueKey": "Tb_Qr5CIA"
                  }
          ],
          }
          }
  </code></pre>
  
  <p>I made function to get the data </p>
  
  <pre><code>Future&lt;Null&gt; fetchProjects() {
      return http.get("JSON link")
          .then&lt;Null&gt;((http.Response response) {
        final List&lt;Project&gt; fetchedProjectList = [];
        final Map&lt;String, dynamic&gt; projectListData = json.decode(response.body);
  
        if (projectListData == null) {
          _isLoading = false;
          notifyListeners();
          return;
        }
  
        projectListData.forEach((String projectId, dynamic projectData) {
  
          final Project project = Project(
            title: projectData['title'],
            location: projectData['location'],
            images: projectData['images'],
            simulation: ???
  
  
          );
          fetchedProjectList.add(project);
          }
  </code></pre>