resetLazySingleton<T extends Object> method
Resolvable<Unit>
resetLazySingleton<T extends Object>({
- Entity groupEntity = const DefaultEntity(),
inherited
Resets the singleton instance of a lazily loaded dependency.
Implementation
Resolvable<Unit> resetLazySingleton<T extends Object>({
Entity groupEntity = const DefaultEntity(),
}) {
final temp = getLazy<T>(groupEntity: groupEntity);
if (temp.isSome()) {
UNSAFE:
return temp.unwrap().then((e) {
e.resetSingleton();
return Unit();
});
}
return syncUnit();
}