Created
July 21, 2019 12:48
-
-
Save SAGARSURI/3696e822a80add00cced1a18e9f8c94a 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
import 'dart:async'; | |
import 'movie_api_provider.dart'; | |
import 'package:inject/inject.dart'; | |
import '../models/state.dart'; | |
class Repository { | |
final MovieApiProvider _moviesApiProvider; | |
@provide | |
Repository(this._moviesApiProvider); | |
Future<State> fetchAllMovies() => _moviesApiProvider.fetchMovieList(); | |
Future<State> fetchTrailers(int movieId) => _moviesApiProvider.fetchTrailer(movieId); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment