Last active
July 2, 2019 21:16
-
-
Save xsahil03x/616d8fd14c00438909297947d06b630a to your computer and use it in GitHub Desktop.
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
class MovieRepository { | |
final String _apiKey = "Paste your api key here"; | |
ApiBaseHelper _helper = ApiBaseHelper(); | |
Future<List<Movie>> fetchMovieList() async { | |
final response = await _helper.get("movie/popular?api_key=$_apiKey"); | |
return MovieResponse.fromJson(response).results; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment