Skip to content

There's no way for InheritedElement to know that a dependent has been deactivated #129207

Description

@s0nerik

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 after dependency._dependents.remove(this) inside the Element.deactivate()

Activity

  1. added
    in triagePresently being triaged by the triage team
    c: new featureNothing broken; request for a new capability
    frameworkflutter/packages/flutter repository. See also f: labels.
    c: proposalA detailed proposal for a change to Flutter
    and removed
    in triagePresently being triaged by the triage team
    on Jun 21, 2023
  2. added
    P3Issues that are less important to the Flutter project
    and removed on Jun 28, 2023
  3. goderbauer commented on Jul 7, 2023

    @goderbauer
    Member

    Duplicate of #128432.

  4. github-actions commented on Jul 21, 2023

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  5. locked as resolved and limited conversation to collaborators on Jul 21, 2023
  6. added a commit that references this issue on Nov 3, 2023
    b5fb665
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterframeworkflutter/packages/flutter repository. See also f: labels.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions