onDependencyDelete method

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

Called when a dependency is deleted via LevitScope.delete or LevitScope.reset.

  • scopeId: Unique identifier for the scope instance.
  • scopeName: The name of the scope from which the dependency was deleted.
  • key: The key of the deleted dependency.
  • info: Metadata about the deleted dependency.
  • source: The method that triggered the event (e.g., 'delete', 'reset').
  • parentScopeId: The ID of the parent scope, or null if root.

Implementation

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