factory<T extends Object> method
void
factory<T extends Object>(})
a conditional wrapper method for getIt.registerFactory
it only registers if _canRegister
returns true
Implementation
void factory<T extends Object>(
FactoryFunc<T> factoryfunc, {
String? instanceName,
Set<String> registerFor = const {},
}) {
if (_canRegister(registerFor)) {
getIt.registerFactory<T>(factoryfunc, instanceName: instanceName);
}
}