factoryParamAsync<T extends Object, P1, P2> method

void factoryParamAsync<T extends Object, P1, P2>(
  1. FactoryFuncParamAsync<T, P1?, P2?> factoryFunc, {
  2. String? instanceName,
  3. Set<String>? registerFor,
})

a conditional wrapper method for getIt.registerFactoryParamAsync it only registers if _canRegister returns true

Implementation

void factoryParamAsync<T extends Object, P1, P2>(
  FactoryFuncParamAsync<T, P1?, P2?> factoryFunc, {
  String? instanceName,
  Set<String>? registerFor,
}) {
  if (_canRegister(registerFor)) {
    getIt.registerFactoryParamAsync<T, P1, P2>(
      factoryFunc,
      instanceName: instanceName,
    );
  }
}