kashi_sync 1.6.0 copy "kashi_sync: ^1.6.0" to clipboard
kashi_sync: ^1.6.0 copied to clipboard

Offline-first sync for Flutter apps on Drift, with a transactional outbox with batched push and retries, and a cursor-based pull that never overwrites unsent edits.

kashi_sync #

Flutter half of @softwareseva/sync, on Drift.

  • Outbox: write locally and call engine.enqueue(type, payload, entity:, entityId:) in the same db.transaction. The engine pushes in batches, deletes applied or replayed ops, retries retryable failures with exponential backoff, and parks permanent failures in needsAttention().
  • Pull: GET /sync/pull?since=<cursor> pages through the server's change log; each page applies in one transaction and advances the cursor. Rows with unsent local edits are skipped until the push lands, so offline edits are never overwritten.
  • Lifecycle: start() after sign-in (periodic and on reconnect), clearAll() on sign-out.

The engine creates its own tables (kashi_outbox, kashi_sync_state); your Drift schema only holds your entities. See the flutter-drift-sync skill.

0
likes
160
points
111
downloads

Documentation

API reference

Publisher

verified publishersoftwareseva.org

Weekly Downloads

Offline-first sync for Flutter apps on Drift, with a transactional outbox with batched push and retries, and a cursor-based pull that never overwrites unsent edits.

Repository (GitHub)
View/report issues
Contributing

License

MIT (license)

Dependencies

drift, flutter, kashi_core

More

Packages that depend on kashi_sync