Create an Injector by using annotation @GenerateInjector
and pass the List of types, then the generator will create the respective injector.
link:example/type.dart[role=include]
Full code:
link:example/type.dart[role=include]
In this case you can specify the token corresponding to the dependency that will be injected. For example:
link:example/inject.dart[role=include]
In this case we can mark dependencies as optional, so if the value is not injected then a null value is passed. For example:
link:example/optional.dart[role=include]
In this case we can mark dependencies as self, so the injector should retrieve a dependency only from itself. For example:
link:example/self.dart[role=include]