Annotates a method to generate an Injector factory at compile-time.
@GenerateInjector is conceptually similar to using
@Directive with a
providers: const [ ... ] argument, or to creating a
an injector at runtime with ReflectiveInjector, but like a component or
directive that injector is generated ahead of time, during compilation:
import 'my_file.template.dart' as ng; @GenerateInjector(const [ const Provider(A, useClass: APrime), ]) // The generated factory is your method's name, suffixed with `$Injector`. final InjectorFactory example = example$Injector;