replace<P> method
Replaces a registered dependency with a new one.
Implementation
void replace<P>(P child, {String? tag}) async {
final InstanceInfo info = Get.getInstanceInfo<P>(tag: tag);
final bool permanent = info.isPermanent ?? false;
delete<P>(tag: tag, force: permanent);
put(child, tag: tag, permanent: permanent);
}