Skip to content

Installation ​

Add the packages that match your sync direction, then continue to Quick Start.

Not sure which packages? See Choosing Push or Pull.

Packages are published on pub.dev.

yaml
dependencies:
  flutter_offline_sync_push: ^0.1.2
  flutter_offline_sync_pull_flutter: ^0.1.2
  flutter_offline_sync_ui: ^0.1.2 # optional

flutter_offline_sync_push and flutter_offline_sync_pull_flutter re-export their core packages — you usually do not need separate flutter_offline_sync_core / flutter_offline_sync_pull entries unless you use core-only (tests, CLI).

Packagepub.dev
flutter_offline_sync_corepub.dev/packages/flutter_offline_sync_core
flutter_offline_sync_pushpub.dev/packages/flutter_offline_sync_push
flutter_offline_sync_pullpub.dev/packages/flutter_offline_sync_pull
flutter_offline_sync_pull_flutterpub.dev/packages/flutter_offline_sync_pull_flutter
flutter_offline_sync_uipub.dev/packages/flutter_offline_sync_ui

Git dependency (optional) ​

Pin a tag or commit, not a moving branch, for production apps:

yaml
dependencies:
  flutter_offline_sync_push:
    git:
      url: https://github.com/LidhinCS/flutter_offline_sync.git
      ref: v0.1.2
      path: packages/flutter_offline_sync_push

  flutter_offline_sync_pull_flutter:
    git:
      url: https://github.com/LidhinCS/flutter_offline_sync.git
      ref: v0.1.2
      path: packages/flutter_offline_sync_pull_flutter

  flutter_offline_sync_ui:
    git:
      url: https://github.com/LidhinCS/flutter_offline_sync.git
      ref: v0.1.2
      path: packages/flutter_offline_sync_ui

Codegen ​

flutter_offline_sync_core and flutter_offline_sync_pull use Drift. Published packages include generated .g.dart files — consumers do not need to run build_runner for these packages.

Contributors changing Drift schemas in this repo:

bash
dart run melos run build_runner

Transitive dependencies ​

Flutter adapters bring:

  • workmanager
  • connectivity_plus
  • Drift / SQLite (via core packages)

Ensure your app uses a compatible Flutter / Dart SDK (see each package’s pubspec.yaml).

Choose packages ​

NeedAdd
Offline writes onlyflutter_offline_sync_push
Server pull onlyflutter_offline_sync_pull_flutter
Job status UIflutter_offline_sync_ui
Unit tests without Flutter UIflutter_offline_sync_core or flutter_offline_sync_pull directly

Next ​

  1. Quick Start — first working enqueue + syncAll
  2. Push / Pull — deeper guides
  3. Offline Notes example — full integration sample

Released under the MIT License.