Skip to content

Instantly share code, notes, and snippets.

@xsahil03x
Last active July 2, 2019 21:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xsahil03x/616d8fd14c00438909297947d06b630a to your computer and use it in GitHub Desktop.
Save xsahil03x/616d8fd14c00438909297947d06b630a to your computer and use it in GitHub Desktop.
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