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

Drift demo with riverpod #259

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open

Drift demo with riverpod #259

wants to merge 15 commits into from

Conversation

simolus3
Copy link
Contributor

@simolus3 simolus3 commented Mar 24, 2025

This changes the supabase_todolist_drift package to also use Riverpod for state management. This example can then serve as a guide for integrating PowerSync with popular state management solutions (I'll open a PR to our documentation linking towards it).

The idea is to adopt best practices of modern state management in Flutter. This changes the example to:

  • Extract the PowerSync database and relevant fields (like the auto-updating SyncState) into Riverpod providers.
  • Consume providers from widgets (for simple queries) or through wrapping Notifiers to bundle similar functionality.
  • Adopt auto_route for declarative routing.

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 this pull request may close these issues.

None yet

1 participant