onDependencyResolve method

void onDependencyResolve(
  1. int scopeId,
  2. String scopeName,
  3. String key,
  4. LevitDependency info, {
  5. required String source,
  6. int? parentScopeId,
})

Called when a dependency is resolved (created or returned) via LevitScope.find or its variants.

  • scopeId: Unique identifier for the scope instance.
  • scopeName: The name of the scope where the dependency was found.
  • key: The key of the resolved dependency.
  • info: Metadata about the resolved dependency.
  • source: The method that triggered the event (e.g., 'find', 'findAsync').
  • parentScopeId: The ID of the parent scope, or null if root.

Implementation

void onDependencyResolve(
    int scopeId, String scopeName, String key, LevitDependency info,
    {required String source, int? parentScopeId}) {}