replace<P> method
Replace a parent instance of a class in dependency management
with a child
instance
tag
optional, if you use atag
to register the Instance.
Implementation
void replace<P>(P child, {String? tag}) {
final info = getInstanceDetails<P>(tag: tag);
final permanent = (info.isPermanent ?? false);
delete<P>(tag: tag, force: permanent);
put(() => child, tag: tag, permanent: permanent);
}