Skip to main content

offline_courier 0.2.1 copy "offline_courier: ^0.2.1" to clipboard
offline_courier: ^0.2.1 copied to clipboard

Offline-first HTTP outbox for Flutter: persists requests in native SQLite and replays them with backoff when the network returns, even after the app is killed. Zero dependencies.

0.2.1 #

  • Shorter package description for pub.dev and search engines.
  • Code formatted with dart format.

0.2.0 #

  • CourierService (Android): a foreground service with its own Flutter engine that runs your callback every interval with OfflineCourier.instance ready. It keeps working with the screen off, after Back, after a swipe from Recents (it is restarted if the system kills the process) and, with resumeAfterReboot, after a reboot or an app update.
  • CourierNotification: title, text, channel, icon, stop action and tap behaviour, set from code before starting; updateNotification changes it at runtime (also from the callback).
  • start, pause, resume, stop, state, isRunning, watchState and requestNotificationPermission. Paused services release their wake lock.
  • start validates the manifest declaration and permissions and explains what is missing.
  • OfflineCourier.configBuilder exposes the builder passed to initialize.

0.1.0 #

  • Initial release, with zero dependencies beyond the Flutter SDK.
  • OfflineCourier facade: send, post/put/patch/delete, enqueue, syncNow, events, watchPendingCount, dead-letter management.
  • SyncEngine with exponential backoff, full/equal jitter, Retry-After support, TTL (maxAge), single-flight drains and lease-based claims safe across isolates.
  • Native SQLite store (Android android.database.sqlite, iOS libsqlite3) shared by every engine, with a pluggable Dart-side PayloadCipher.
  • Native connectivity (ConnectivityManager validated networks / NWPathMonitor).
  • Native background sync (JobScheduler / BGTaskScheduler) running a headless engine that rebuilds the app's top-level config builder.
  • iOS background sync (BGTaskScheduler) is implemented but not yet verified on a physical iPhone; foreground behaviour is verified on the simulator.
  • IoRequestExecutor on dart:io; Idempotency-Key header on every attempt; timed-out requests are aborted.
  • dedupeKey last-write-wins, also against an older version that is in flight (it is superseded and never re-sent after the newer one).
  • OrderingMode.strictPerTag keeps FIFO even with concurrent send calls.
  • The app isolate keeps draining (retry timer included) while the app is in the background but alive, e.g. under a foreground service; the OS job is armed as a backup.
  • When a request to a server succeeds, tasks waiting for a retry on that same server are sent right away instead of sleeping through their backoff (429 responses keep their wait).
  • Tasks created in the same millisecond keep their FIFO order.
  • Background runs free the drain lock and leases of an engine the OS stopped, re-arm themselves after skipping a held lock, and step aside while the app is visible (the periodic job uses a flex window).
1
likes
160
points
0
downloads

Documentation

API reference

Publisher

verified publisherteam17apps.link

Weekly Downloads

Offline-first HTTP outbox for Flutter: persists requests in native SQLite and replays them with backoff when the network returns, even after the app is killed. Zero dependencies.

Repository (GitHub)
View/report issues

Topics

#offline #sync #http #background

License

MIT (license)

Dependencies

flutter

More

Packages that depend on offline_courier

Packages that implement offline_courier