lazyPut<S> static method

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

Registers a builder that will be executed only when the dependency is first requested.

If permanent is true, the registration persists through a reset. If isFactory is true, a new instance is created every time find is called.

Implementation

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