lazyPut<S> method

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

Registers a lazy singleton dependency. The fenix flag determines whether the dependency should be reconstructed when disposed.

S is the type of the dependency, builder is the function to create the instance, and tag is an optional identifier for the instance.

Implementation

void lazyPut<S>(InstanceBuilderCallback<S> builder,
    {String? tag, bool fenix = false}) {
  Get.lazyPut<S>(builder, tag: tag, fenix: fenix);
}