Picture a field worker in a basement with no signal. They fill in a long inspection form and tap Submit .
In a cloud-first app, that tap starts a network request. The user watches a spinner, then an error, then fills the form in again later.
In an offline-first app, four things happen instead.
The four steps
Instant write. The data goes straight to the on-device database. It is a local disk write, not a network call.
Instant feedback. The UI shows success right away. No spinner, no "please try again".
Queued. The sync engine flags the record as pending upload.
Silent sync. When the device reconnects, the record uploads in the background.
The user never waits on the network, because the UI never talks to it directly. The local database is the source of truth; the server is something the app syncs with.
A minimal sketch in Dart
This is the shape of it, not a full implementation. The model carries a flag that says whether the server has it yet.
class Inspection { Inspection ({ required this .…