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

flag to run Riverpod async from the app/ Rebuild providers even if the app is in background #3960

Open
Raphael2b3 opened this issue Feb 4, 2025 · 3 comments
Assignees
Labels
enhancement New feature or request question Further information is requested

Comments

@Raphael2b3
Copy link

Raphael2b3 commented Feb 4, 2025

Why this feature

  • I have a Timer that runs in the background.
  • It fetches some data, and updates settings.
  • This update calls ref.notifylisteners.
  • Another Provider that watches the settings, should be rebuild immediatly (not when the app first comes to the foreground), because it does another task fetch, that is time consuming.

Describe the solution you'd like
We could add a flag that allows to make riverpod run in the background, async from the app.

Describe alternatives you've considered
I could move away from riverpod and start an js likely event driven approach a.timerStart().onEvent(()=>updateB()). But i need to get access to the ref object, in order to update some UI. in a and b

@rrousselGit
Copy link
Owner

Sounds like a duplicate of #2671

@rrousselGit rrousselGit added question Further information is requested and removed needs triage labels Feb 4, 2025
@Raphael2b3
Copy link
Author

Where can I learn about the architecture of riverpod in order to understand how I can contribute to it. Or should I just read the source code 🤔

@rrousselGit
Copy link
Owner

Just read the source

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