lazyPut<S> method

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

Lazily registers an instance builder.

Implementation

void lazyPut<S>(
  InstanceBuilderCallback<S> builder, {
  String? tag,
  bool fenix = false,
}) {
  final key = _getKey(S, tag);
  _factories[key] = InstanceBuilderFactory<S>(
    isSingleton: true,
    builderFunc: builder,
    permanent: false,
    isInit: false,
    fenix: fenix,
    tag: tag,
    lateRemove: null,
  );
}