Simpler state management with Dart on the server and synced databases
summary
Argues that SQLite + Drift lets identical typed database code run on client and server, shows Postgres support and a Shelf backend using generated Drift queries, and demonstrates a PowerSync-based sync engine that listens to DB change streams, authenticates with JWTs, and applies local session change-sets (SQLite session extension produces compact patches) to keep devices consistent while preserving transactions and retrying uploads for offline writes. Claims this removes custom cache logic and makes cross-device state behave like local-only state.
AI-written summary · about
chapters (12)
- 0:00Dart state management intro
- 1:23SQLite for local data
- 10:09Choosing SQLite packages
- 11:55Setting up Drift
- 13:59SQLite in Flutter apps
- 16:05SQLite on server with Dart
- 17:51Drift for PostgreSQL
- 20:59Client-server database sync
- 22:23Manual sync challenges
- 27:12Automating sync engines
- 27:55Live sync demo
- 35:43Key takeaways
related talks
42mGoing Offline first with Flutter
09mDelete Your Global State: Use SQLite as the Ultimate State Manager
21mOffline first Flutter applications
33mSurviving Network Failures: Building Resilient Offline-First…
47mThe future of Real-time/offline/data
41mSync is the Future of Mobile Data
40mBoost App Reliability: Offline Storage Solutions with AWS Expertise
46mRethinking Syncing
