lazyReplace<P> method
Registers a lazy singleton dependency, replacing any existing dependency. This allows for automatic recreation of the dependency if disposed.
Implementation
void lazyReplace<P>(InstanceBuilderCallback<P> builder,
{String? tag, bool? fenix}) {
final InstanceInfo info = Get.getInstanceInfo<P>(tag: tag);
final bool permanent = info.isPermanent ?? false;
delete<P>(tag: tag, force: permanent);
lazyPut(builder, tag: tag, fenix: fenix ?? permanent);
}