Created
January 6, 2019 19:47
-
-
Save salihgueler/bb116717d66d97e4950cdf3b5318dfbc to your computer and use it in GitHub Desktop.
Saturday
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Method to parse information from the retrieved data | |
List<Movie> createMovieList(List data) { | |
List<Movie> list = new List(); | |
for (int i = 0; i < data.length; i++) { | |
String title = data[i]["title"]; | |
String posterPath = data[i]["poster_path"]; | |
String backdropImage = data[i]["backdrop_path"]; | |
String originalTitle = data[i]["original_title"]; | |
double voteAverage = data[i]["vote_average"]; | |
String overview = data[i]["overview"]; | |
String releaseDate = data[i]["release_date"]; | |
Movie movie = new Movie( | |
title, | |
posterPath, | |
backdropImage, | |
originalTitle, | |
voteAverage, | |
overview, | |
releaseDate); | |
list.add(movie); | |
} | |
return list; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment