Skip to content

Instantly share code, notes, and snippets.

@SAGARSURI
Created July 21, 2019 13:29
Show Gist options
  • Save SAGARSURI/9ca4fe7b8bd7354cfd36025c97e90ad3 to your computer and use it in GitHub Desktop.
Save SAGARSURI/9ca4fe7b8bd7354cfd36025c97e90ad3 to your computer and use it in GitHub Desktop.
import 'package:inject/inject.dart';
import 'package:my_movies/src/resources/movie_api_provider.dart';
import 'package:http/http.dart' as http;
import 'mock_client.dart';
@module
class ProviderModule{
@provide
@singleton
http.Client client() => MockClient();
@provide
@singleton
MovieApiProvider movieApiProvider(http.Client client) => MovieApiProvider(client);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment