exists<T> method

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

Check if a dependency exists (instance or lazy factory) in this scope hierarchy without instantiating any lazy factories.

Implementation

bool exists<T>({String? tag}) {
  if (_disposed) return false;
  if (existsInThisScope<T>(tag: tag)) return true;
  return parent?.exists<T>(tag: tag) ?? false;
}