Skip to content

Choosing Push or Pull ​

Pick packages based on the direction of data — not on “sync” as a single blob.

Decision guide ​

Your needAdd
Queue offline writes, retry, multi-step API flowsflutter_offline_sync_push
Download / refresh server data into local DBflutter_offline_sync_pull_flutter
Both directionsBoth packages above
Job status badges / banners / list tilesflutter_offline_sync_ui (optional)
Unit tests without Flutter pluginsflutter_offline_sync_core and/or flutter_offline_sync_pull

flutter_offline_sync_push re-exports flutter_offline_sync_core.
flutter_offline_sync_pull_flutter re-exports flutter_offline_sync_pull.

Push only ​

Use when users create or update data offline and you must flush those writes later.

Examples: create a note, submit a form, upload then create, retry after 5xx.

Start here: Quick Start → Push.

Pull only ​

Use when the device should ingest server lists/details into a local DB, with pagination and resume.

Examples: product catalog, document list + detail, workflow list + missing detail batch.

Start here: Pull.

Full stack ​

Most offline-first apps need both:

  1. Push first on reconnect — flush local writes (engine.syncAll())
  2. Pull second — refresh from server (pullCoordinator.runAll())

That order avoids overwriting local pending work with a stale server snapshot. See Architecture.

The teaching app examples/notes_app wires both plus UI.

What about Drift / Dio / Bloc? ​

  • Drift (or any App DB) — recommended for business data; packages do not require your App DB to be Drift, but package metadata DBs use Drift internally.
  • Dio — common, not required; handlers can use any HTTP stack.
  • Bloc / Riverpod / GetX / Provider — optional; packages are architecture-agnostic.

See Installation for pubspec snippets.

Released under the MIT License.