factoryParamAsync<T extends Object, P1, P2> method

void factoryParamAsync<T extends Object, P1, P2>(
  1. FactoryFuncParamAsync<T, P1?, P2?> factoryfunc, {
  2. required String instanceName,
  3. required 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, {
  required String instanceName,
  required Set<String> registerFor,
}) {
  if (_canRegister(registerFor)) {
    getIt.registerFactoryParamAsync<T, P1, P2>(
      factoryfunc,
      instanceName: instanceName,
    );
  }
}