lazyPutAsync<S> static method

Future<S> Function() lazyPutAsync<S>(
  1. Future<S> builder(), {
  2. String? tag,
  3. bool permanent = false,
  4. bool isFactory = false,
})

Registers an asynchronous builder for lazy instantiation.

Use findAsync to retrieve the instance once the future completes.

  • builder: A function returning a Future of the dependency.
  • tag: Optional unique identifier for the instance.
  • permanent: If true, the registration persists through a reset.
  • isFactory: If true, the builder is re-run for every findAsync call.

Implementation

static Future<S> Function() lazyPutAsync<S>(Future<S> Function() builder,
    {String? tag, bool permanent = false, bool isFactory = false}) {
  return Ls.lazyPutAsync<S>(builder,
      tag: tag, permanent: permanent, isFactory: isFactory);
}