State & Data
Offline-first storage
Offline-first means the application remains useful when the network is unavailable. Store the minimum durable state locally and synchronize only when a server exists.
| Data | Good fit | Reason |
|---|---|---|
| User settings | SharedPreferences | Small key/value data |
| Structured records | SQLite/Drift | Queries and relationships |
| Export/import | JSON/CSV | Portable backups |
| Large binary files | File system / object storage | Avoid putting blobs in preferences |
Backup rule
Export formats should be versioned. A future app version must know how to interpret older backups.
Lesson complete?Use the next lesson to continue the learning path.