Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement "remove" functionality for CollapsingState #3250

Closed
dmackdev opened this issue Aug 13, 2023 · 0 comments · Fixed by #3252
Closed

Implement "remove" functionality for CollapsingState #3250

dmackdev opened this issue Aug 13, 2023 · 0 comments · Fixed by #3252

Comments

@dmackdev
Copy link
Contributor

dmackdev commented Aug 13, 2023

Is your feature request related to a problem? Please describe.
I am using CollapsingState for more granular control for managing collapsing headers over using the CollapsingHeader widget directly. This struct contains an state: InnerState field which is persisted in memory. Currently, I believe it is only possible to load and store the persisted InnerState, and it is not possible to remove it from memory:

  • CollapsingState does not currently provide a method to remove InnerState,
  • InnerState has the visibility of pub(crate), so it cannot be used to remove an IdTypeMap entry directly via generics.

I have a particular use case for being able to remove InnerState from memory, and I think it would be useful in general, given that it is possible to load/save this state.

Describe the solution you'd like
Implement a remove method for CollapsingState to remove the associated InnerState from memory.

Describe alternatives you've considered
Resetting memory is possible, but this would affect all widgets rather than just a single CollapsingState.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant