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 = GetInstance().getInstanceInfo<P>(tag: tag);
  final permanent = (info.isPermanent ?? false);
  delete<P>(tag: tag, force: permanent);
  GetInstance().lazyPut(builder, tag: tag, fenix: fenix ?? permanent);
}