has<T> method

bool has<T>({
  1. String? tag,
})

check if one dependency is available to call to the find method

Implementation

bool has<T>({String? tag}) {
  final key = _getKey(T, tag);
  final inVars = _vars.containsKey(key);
  if (inVars) return true;
  final inFactoryVars = _factoryVars.containsKey(key);
  if (inFactoryVars) return true;
  final inLazyVars = _lazyVars.containsKey(key);
  return inLazyVars;
}