title: Flutter List View error in building list view
body: <p>I get an error while I'm building the ListView, At first I thought the API wasn't returning anything but I printed the movies variable in flutter and it consoled log the values.
  Btw I'm trying to recreate this project: </p>
  
  <p><a href="https://github.com/mlabouardy/flutter-watchnow" rel="nofollow noreferrer">https://github.com/mlabouardy/flutter-watchnow</a></p>
  
  <p>The error I get is:</p>
  
  <blockquote>
    <p>RangeError (index): Invalid value: Valid value range is empty: 0</p>
  </blockquote>
  
  <p>This is the list view builder: </p>
  
  <pre><code>class TopMoviesState extends State&lt;TopMovies&gt; {
    List&lt;Movie&gt; _movies = new List();
    final _apiGatewayURL = "https://gfioehu47k.execute-api.us-west-1.amazonaws.com/staging/main";
  
    Widget _fetchMovies() {
      return new ListView.builder(
          padding: const EdgeInsets.all(16.0),
          itemBuilder: (context, i){
            return new Card(
                child: new Container(
                    height: 250.0,
                    child: new Padding(
                        padding: new EdgeInsets.all(2.0),
                        child: new Row(
                            children: &lt;Widget&gt;[
                              new Align(
                                child: new Hero(
                                    child: new Image.network("https://image.tmdb.org/t/p/w500"+this._movies[i].getPoster()),
                                    tag: this._movies[i].getTitle()
                                ),
                                alignment: Alignment.center,
                              ),
                              new Expanded(
                                  child: new Stack(
                                      children: &lt;Widget&gt;[
                                        new Align(
                                          child: new Text(
                                            this._movies[i].getTitle(),
                                            style: new TextStyle(fontSize: 11.0, fontWeight: FontWeight.bold),
                                          ),
                                          alignment: Alignment.topCenter,
                                        ),
                                        new Align(
                                          child: new Padding(
                                              padding: new EdgeInsets.all(4.0),
                                              child: new Text(
                                                  this._movies[i].getOverview(),
                                                  maxLines: 8,
                                                  overflow: TextOverflow.ellipsis,
                                                  style: new TextStyle(fontSize: 12.0, fontStyle: FontStyle.italic)
                                              )
                                          ),
                                          alignment: Alignment.centerRight,
                                        ),
                                        new Align(
                                          child: new Text(
                                            this._movies[i].getReleaseDate(),
                                            style: new TextStyle(fontSize: 11.0, fontWeight: FontWeight.bold),
                                          ),
                                          alignment: Alignment.bottomRight,
                                        ),
                                      ]
                                  )
                              )
                            ]
                        )
                    )
                )
            );
          }
      );
    }
  </code></pre>
  
  <p>This is how I'm running through each value I'm getting from the API:</p>
  
  <pre><code>void _addMovie(dynamic movie){
  this._movies.add(new Movie(
      title: movie["title"],
      overview: movie["overview"],
      poster: movie["poster_path"],
      releaseDate: movie["release_date"]
  ));
    }
    @override
    void initState() {
      super.initState();
      http.get(this._apiGatewayURL)
          .then((response) =&gt; response.body)
          .then(json.decode)
          .then((movies) {
        movies.forEach(_addMovie);
      });
    }
  </code></pre>