lazyReplace<P> static method

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

Implementation

static void lazyReplace<P>(InstanceBuilderCallback<P> builder,
    {String? tag, bool? fenix}) {
  final info = Get.getInstanceInfo<P>(tag: tag);
  final permanent = (info.isPermanent ?? false);
  delete<P>(tag: tag, force: permanent);
  Get.lazyPut(builder, tag: tag, fenix: fenix ?? permanent);
}