resetLazySingletonK<T extends Object> method
Resets the singleton instance of a lazily loaded dependency.
Implementation
@protected
Resolvable<Unit> resetLazySingletonK<T extends Object>(
Entity typeEntity, {
Entity groupEntity = const DefaultEntity(),
}) {
final temp = getK<T>(
TypeEntity(Lazy, [typeEntity]),
groupEntity: groupEntity,
);
if (temp.isSome()) {
UNSAFE:
return temp.unwrap().then((e) {
(e as Lazy).resetSingleton();
return Unit();
});
}
return syncUnit();
}