CustomAsyncDep<Value> constructor

CustomAsyncDep<Value>(
  1. BaseScopeContainer scope,
  2. DepBuilder<Value> builder, {
  3. required AsyncDepCallback<Value> init,
  4. required AsyncDepCallback<Value> dispose,
  5. String? name,
  6. AsyncDepObserverInternal? observer,
  7. AsyncDepBehavior<Value, AsyncDep<Value>>? behavior,
})

Creates a custom async dependency.

scope - The scope container that owns this dependency builder - Factory function that creates the dependency value init - Async callback called during dependency initialization dispose - Async callback called during dependency disposal name - Optional name for debugging purposes observer - Optional observer for monitoring dependency lifecycle

Implementation

CustomAsyncDep(
  BaseScopeContainer scope,
  DepBuilder<Value> builder, {
  required AsyncDepCallback<Value> init,
  required AsyncDepCallback<Value> dispose,
  String? name,
  AsyncDepObserverInternal? observer,
  AsyncDepBehavior<Value, AsyncDep<Value>>? behavior,
}) : super._(
        scope,
        builder,
        behavior ?? CoreAsyncDepBehavior<Value, AsyncDep<Value>>(),
        name: name,
        observer: observer,
        init: init,
        dispose: dispose,
      );