Skip to content

Instantly share code, notes, and snippets.

@kauemurakami
Created July 16, 2020 18:56
Show Gist options
  • Save kauemurakami/2ac66a205565ee35b9cadd0eae4c6d2c to your computer and use it in GitHub Desktop.
Save kauemurakami/2ac66a205565ee35b9cadd0eae4c6d2c to your computer and use it in GitHub Desktop.
Details dependencies
import 'package:get/get.dart';
import 'package:getx_pattern/app/controller/details/details_controller.dart';
import 'package:getx_pattern/app/data/provider/api.dart';
import 'package:getx_pattern/app/data/repository/posts_repository.dart';
import 'package:http/http.dart' as http;
class DetailsBinding implements Bindings{
@override
void dependencies() {
Get.lazyPut<DetailsController>(() {
return DetailsController(
repository:
MyRepository(apiClient: MyApiClient(httpClient: http.Client())));
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment