hasNamed method

bool hasNamed(
  1. String name
)

Determines if the container has a named singleton with the given name.

Implementation

bool hasNamed(String name) {
  Container? search = this;

  while (search != null) {
    if (search._namedSingletons.containsKey(name)) {
      return true;
    } else {
      search = search._parent;
    }
  }

  return false;
}