Last active
September 8, 2018 20:29
-
-
Save letsar/e149614c47659a1b251d2c22b63970e9 to your computer and use it in GitHub Desktop.
This file contains 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
// GENERATED CODE - DO NOT MODIFY BY HAND | |
part of 'test01.dart'; | |
// ************************************************************************** | |
// InjectorGenerator | |
// ************************************************************************** | |
class _$Injector extends Injector { | |
void configure() { | |
final Container container = Container(); | |
container.registerSingleton((c) => ServiceA()); | |
container | |
.registerFactory<Service, ServiceB>((c) => ServiceB(c<ServiceA>())); | |
container.registerFactory((c) => ServiceB(c<ServiceA>()), name: 'factoryB'); | |
container.registerFactory( | |
(c) => ServiceC(c<ServiceA>(), c<ServiceB>('factoryB'))); | |
container.registerFactory((c) => ServiceC.other(c<ServiceB>())); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment