factory<T> method

void factory<T>(
  1. Definition<T> definition, {
  2. Qualifier? qualifier,
})

Implementation

void factory<T>(Definition<T> definition, {Qualifier? qualifier}) {
  final BeanDefinition<T> def =
      Definitions.createFactory(rootScope, qualifier, definition);
  definitions.add(def);
}