registerFactory<T> method

void registerFactory <T>(FactoryFunc<T> func, { String instanceName })

registers a type so that a new instance will be created on each call of get on that type T type to register func factory function for this type instanceName if you provide a value here your factory gets registered with that name instead of a type. This should only be necessary if you need to register more than one instance of one type. Its highly not recommended

Implementation

void registerFactory<T>(FactoryFunc<T> func, {String instanceName}) {
  _register<T>(
      type: _ServiceFactoryType.alwaysNew,
      instanceName: instanceName,
      factoryFunc: func,
      signalsReady: false);
}