A user is on a flight with no Wi-Fi. They open your Flutter app and edit a document. On the ground, a colleague opens the web dashboard and edits the same document. The plane lands, the phone reconnects, and your sync service now holds two versions of the same record.
If the app simply pushes its copy and overwrites the server, the colleague's work is gone. Nobody gets an error. The data just quietly disappears.
Offline-first apps need a conflict rule decided up front, not discovered in production. Here are three approaches, from simplest to most careful, and when each one fits.
First, know what is waiting to sync
Conflict resolution only works if the app knows which local records are unsynced.…