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

Configuration for provider #2904

Closed
amevee opened this issue Sep 14, 2023 · 6 comments
Closed

Configuration for provider #2904

amevee opened this issue Sep 14, 2023 · 6 comments
Assignees
Labels
enhancement New feature or request question Further information is requested

Comments

@amevee
Copy link

amevee commented Sep 14, 2023

Is your feature request related to a problem? Please describe.
I'd like to dispose/invalidate all providers related to logged in view, when a user sign out, so we don't hold any user data after sign out.

Describe the solution you'd like
A configuration property which can then be used to get all providers belonging to that config.

Describe alternatives you've considered
With existing implementation, I can leverage name to contain specific word or have dependency to some void provider. Going with former because in later scoped providers need to be explicitly defined in dependency when used elsewhere increasing the work.

@rrousselGit
Copy link
Owner

You should generally use ref.watch for this.

Is there any reason why this wouldn't work for you?

@rrousselGit rrousselGit added question Further information is requested and removed needs triage labels Sep 14, 2023
@amevee
Copy link
Author

amevee commented Sep 14, 2023

In most cases we are using ref.watch only, but still there are certain providers which are in keepAlive.

@rrousselGit
Copy link
Owner

What what's the issue?

@amevee
Copy link
Author

amevee commented Sep 14, 2023

There isn't an issue, it's just a feature to find out all providers with some config so they can be collectively disposed. We can't just rely on provider auto dispose through tracking live widgets (because few providers are keepAlive), and would need some way to dispose group of providers collectively.

@rrousselGit
Copy link
Owner

I'm just failing to understand the problem & proposal here. Some example of what you're currently doing vs what you'd like would help

@rrousselGit
Copy link
Owner

Closing as this issue is unclear. Please open a new issue with a more precise proposal if you still want something done :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants