locate method

dynamic locate(
  1. String? name
)

Gets a dependency locator by its name.

  • name the name of the dependency to locate. Returns the dependency locator or null if locator was not configured.

Implementation

dynamic locate(String? name) {
  if (name == null) throw Exception('Dependency name cannot be null');
  if (_references == null) throw Exception('References shall be set');

  return _dependencies[name];
}