Skip to content

Container can lose its child's state #161698

@loic-sharma

Description

@loic-sharma

Use case

The Container widget changes the tree hierarchy when its arguments change. This causes its child will lose its state if it doesn't have a global key.

Example by @justinmc: https://dartpad.dev/?id=bd243d23a7fd661563519c3eebece032

Proposal

If possible, we should fix Container such that updating its configuration doesn't cause its child to lose state.

If not possible, we should update Container's docs to explain this problem and how to use a global key to workaround it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listframeworkflutter/packages/flutter repository. See also f: labels.team-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy