lazyReplace<P> static method

void lazyReplace<P>(
  1. InstanceBuilderCallback<P> builder, {
  2. String? tag,
  3. bool? fenix,
})

Replaces the registered dependency of type P with a new lazy factory builder.

Delegates to Get.lazyReplace, so registrations that a plain delete keeps alive (a fenix factory, a GetxService, or an entry with a pending lateRemove disposal) are evicted and the new builder always takes their place.

  • tag Optional tag to identify the instance.
  • fenix If true, the builder persists in memory to recreate the instance if deleted. Defaults to true when the replaced instance was permanent.

Implementation

static void lazyReplace<P>(
  InstanceBuilderCallback<P> builder, {
  String? tag,
  bool? fenix,
}) => Get.lazyReplace<P>(builder, tag: tag, fenix: fenix);