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.
pub.dev (recommended)
dependencies:
flutter_offline_sync_push: ^0.1.2
flutter_offline_sync_pull_flutter: ^0.1.2
flutter_offline_sync_ui: ^0.1.2 # optionalflutter_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).
| Package | pub.dev |
|---|---|
flutter_offline_sync_core | pub.dev/packages/flutter_offline_sync_core |
flutter_offline_sync_push | pub.dev/packages/flutter_offline_sync_push |
flutter_offline_sync_pull | pub.dev/packages/flutter_offline_sync_pull |
flutter_offline_sync_pull_flutter | pub.dev/packages/flutter_offline_sync_pull_flutter |
flutter_offline_sync_ui | pub.dev/packages/flutter_offline_sync_ui |
Git dependency (optional)
Pin a tag or commit, not a moving branch, for production apps:
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_uiCodegen
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:
dart run melos run build_runnerTransitive dependencies
Flutter adapters bring:
workmanagerconnectivity_plus- Drift / SQLite (via core packages)
Ensure your app uses a compatible Flutter / Dart SDK (see each package’s pubspec.yaml).
Choose packages
| Need | Add |
|---|---|
| Offline writes only | flutter_offline_sync_push |
| Server pull only | flutter_offline_sync_pull_flutter |
| Job status UI | flutter_offline_sync_ui |
| Unit tests without Flutter UI | flutter_offline_sync_core or flutter_offline_sync_pull directly |
Next
- Quick Start — first working enqueue +
syncAll - Push / Pull — deeper guides
- Offline Notes example — full integration sample
