exists<T> method

bool exists<T>({
  1. String dependencyName = "",
})

Checks if the dependency with the signature of T and dependencyName exists.

Implementation

bool exists<T>({String dependencyName = ""}) {
  _checkValidation<T>();

  final dependencyKey = _getIdentity<T>(dependencyName);
  return _factoryMap.containsKey(dependencyKey);
}