find<S> static method

S find<S>({
  1. String? tag,
})

Retrieves the registered instance of type S.

If the instance is not found in the current scope, it searches upward through parent scopes.

  • tag: The unique identifier used during registration.

Throws an Exception if no registration is found for S and tag.

Implementation

static S find<S>({String? tag}) {
  return currentScope.find<S>(tag: tag);
}