onDependencyInit<S> method

void Function() onDependencyInit<S>(
  1. void onInit(),
  2. S instance,
  3. LevitScope scope,
  4. String key,
  5. LevitDependency info,
)

Intercepts the onInit call of a dependency.

Override this to wrap execution of onInit, for example to auto-capture reactive objects created during initialization.

Returns the functional wrapper around onInit.

Implementation

void Function() onDependencyInit<S>(
  void Function() onInit,
  S instance,
  LevitScope scope,
  String key,
  LevitDependency info,
) =>
    onInit;