Hey fellow Flutter and Dart Devs!
I wanted to share a pull-through caching strategy we implemented in our app, MyApp, to manage data synchronization between a remote backend (Firestore) and a local database (Drift). This approach helps reduce backend reads, provides basic offline capabilities, and offers flexibility in data handling.
Create a system where the app prioritizes fetching data from a local Drift database. If the data isn't present locally or is considered stale (based on a configurable duration), it fetches from Firestore, updates the local cache, and then returns the data.