onDependencyCreate<S> method
S Function()
onDependencyCreate<S>(
- S builder(),
- LevitScope scope,
- String key,
- LevitDependency info,
Called when a dependency instance is being created.
This method allows you to wrap the creation logic, for example, to run it within a specific Zone.
builder: The function that creates the instance.scope: The scope where the dependency is being registered.key: The key of the dependency.info: Metadata about the dependency.
Returns a new builder function that eventually calls builder.
If you don't need to wrap the builder, simply return builder (default behavior).
Implementation
S Function() onDependencyCreate<S>(
S Function() builder,
LevitScope scope,
String key,
LevitDependency info,
) =>
builder;