replace<P> static method

void replace<P>(
  1. P child, {
  2. String? tag,
})

Implementation

static void replace<P>(P child, {String? tag}) {
  final info = June.getInstanceDetails<P>(tag: tag);
  final permanent = (info.isPermanent ?? false);
  delete<P>(tag: tag, force: permanent);
  June.put(() => child, tag: tag, permanent: permanent);
}