unregisterLifecycle method
Un-registers a RaiiLifecycle object from this container.
The lifecycle will be disposed if it is still mounted. This is typically called when manually cancelling or disposing a child resource before the parent is disposed.
Returns true if the lifecycle was registered and successfully removed,
false if it was not registered.
Implementation
@override
@mustCallSuper
bool unregisterLifecycle(RaiiLifecycle lifecycle) {
// Check pending first
if (_pendingLifecycles.remove(lifecycle)) {
return true;
}
return _raiiManager.unregisterLifecycle(lifecycle);
}