There's no way for InheritedElement to know that a dependent has been deactivated #129207
Closed
2 tasks done
Labels
c: new feature
Nothing broken; request for a new capability
c: proposal
A detailed proposal for a change to Flutter
framework
flutter/packages/flutter repository. See also f: labels.
P3
Issues that are less important to the Flutter project
Is there an existing issue for this?
Use case
I'm finishing the promising-looking, easy-to-use approach to state management, which requires that
InheritedElement
is notified when the dependent has been removed from the dependents list to properly close all value change subscriptions upon dependent element deactivation.Proposal
Call the
dependency.onDependentRemoved(this)
right afterdependency._dependents.remove(this)
inside theElement.deactivate()
The text was updated successfully, but these errors were encountered: