lazyReplace<P> method
Replaces a parent instance with a new Instance
lazily from the
<P>builder() callback.
tagoptional, if you use atagto register the Instance.fenixoptional
Note: if fenix is not provided it will be set to true if the parent instance was permanent
Implementation
void lazyReplace<P>(
InstanceBuilderCallback<P> builder, {
String? tag,
bool? fenix,
}) {
final InstanceInfo info = getInstanceInfo<P>(tag: tag);
final bool permanent = info.isPermanent ?? false;
delete<P>(tag: tag, force: permanent);
lazyPut(builder, tag: tag, fenix: fenix ?? permanent);
}