replace<P>  method 
Replace a parent instance of a class in dependency management
with a child instance
- tagoptional, if you use a- tagto 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);
}