delete<S> static method
Removes the registration for S and disposes of the instance.
If the instance implements LevitScopeDisposable, its onClose method is called.
If force is true, deletes even if the dependency was marked as permanent.
Returns true if a registration was found and removed.
Implementation
static bool delete<S>({dynamic key, String? tag, bool force = false}) {
if (key is LevitState) {
return key.deleteIn(Ls.currentScope, tag: tag, force: force);
}
return Ls.delete<S>(tag: tag, force: force);
}