Skip to main content

reliable 0.7.0 copy "reliable: ^0.7.0" to clipboard
reliable: ^0.7.0 copied to clipboard

An offline-first, secure data repository with automatic sync, retry, and encryption for Dart & Flutter.

CHANGELOG #

0.7.0 #

  • feat: SyncEngine closes cleanly, counts sends before they go, and says when to retry
  • close() drops late send and pull results: a closed engine never writes to its stores, so the next user signed in on the device cannot inherit the outbox
  • attempts is counted before each send; SyncMutation.isResend says an earlier send may already have reached the server
  • retryDelay gives a doubling backoff (firstRetryDelay, maxRetryDelay) for the owner to schedule the next flush
  • a change the server keeps failing is logged as an error after reportFailuresAfter sends

0.6.0 #

  • feat: SyncEngine.discard takes back a change the server has not seen (an undo made before it left the device), so neither reaches the server
  • BREAKING: the engine's storage collections are named <namespace>_REPLICA_<collection>, <namespace>_OUTBOX and <namespace>_META (default namespace SYNC), exposed as replicaStoreName, outboxStoreName and metaStoreName so an app can register them with its own store list; stores written by 0.5.0 are not read

0.5.0 #

  • feat: SyncEngine, a local-first sync engine over any StorageAdapter: a replica of the server's documents plus an ordered outbox of the device's own changes (SyncMutation, applied and sent by an app-defined SyncMutationKind), shown together as one view; changes survive restarts, replay under their own idempotency key, refusals are dropped and reported, and pulls page through an app-defined SyncServer cursor

0.4.0 #

  • feat: readCacheFirst, readListCacheFirst and readOneCacheFirst show the cached answer at once and refresh it from the network in the background, so a screen never waits out the request timeout on a link that delivers nothing
  • df_log constraint widened to >=0.6.1 <0.8.0 (only Log.info, Log.alert and Log.err are used), so apps still on df_log 0.6 can upgrade

0.3.3 #

  • Merge branch 'main' into prod

0.3.2 #

  • Merge branch 'main' into prod

0.3.1 #

  • docs: remove Discord, point contributors to issues and email

0.3.0 #

  • chore: standardize README and CI/CD workflows, remove donation links, update contact info and repository links
  • chore: resolve analyzer issues

0.2.1 #

  • Released @ 10/2026 (UTC)
  • A read that got no answer at all (a ReliableNetworkException without a statusCode: offline, dropped connection, timeout, a request the adapter chose not to send) now logs at Log.alert whether or not the cache could answer, and also when the error propagates; being offline is expected, not a bug. Server error statuses, malformed answers and bugs still log at Log.err. ReliableNetworkException.statusCode documents the contract: an adapter throws a status-less exception only for "no answer", and lets a bug propagate as itself

0.2.0 #

  • Released @ 10/2026 (UTC)
  • BREAKING: fetch now throws a FormatException (naming the keys it saw) for a list answer of unknown shape, instead of silently reading it as [] and serving stale cache forever; a list entry that is not an object also throws a FormatException. {items: [...]} is now unwrapped alongside a bare array and {data: [...]}; a null body still reads as []
  • A read whose answer lands after purgeCollections, clearUserData or a setActiveUser switch to another user no longer writes it into the cache (the caller still gets the answer); a purge arriving part-way through a multi-step cache write stops it, and the purge clears what landed
  • SembastAdapter reopens a dead database connection (iOS Safari killing IndexedDB under a backgrounded tab) and retries the operation once, giving up for the session if the reopen fails, hangs past reopenTimeout, or is followed straight away by another dead-connection failure; new optional constructor parameters reopenTimeout and openDatabase, plus recoveryGaveUp and SembastAdapter.isDeadConnectionError
  • A failed read served from cache (NETWORK_OR_ELSE_CACHE) now logs at Log.alert instead of Log.err when the request got no answer at all (offline, dropped connection, timeout); Log.err remains when nothing answered from cache, the error propagates, the server answered with an error status (ReliableNetworkException.statusCode set, e.g. 401 or 5xx), or the answer was malformed
  • A good read whose cache copy cannot be saved is returned as a success, with the failed save logged as a Log.alert warning (REPO_CACHE_WRITE_FAILED) instead of failing the read

0.1.1 #

  • Update dependencies

0.1.0 #

  • Initial release
0
likes
160
points
928
downloads

Documentation

API reference

Publisher

verified publisherdev-cetera.com

Weekly Downloads

An offline-first, secure data repository with automatic sync, retry, and encryption for Dart & Flutter.

Homepage
Repository (GitHub)
View/report issues

Topics

#offline-first #sync #encryption #repository #flutter

License

MIT (license)

Dependencies

df_log, encrypt, flutter, path, path_provider, sembast, sembast_web, shared_preferences, sqflite, synchronized, uuid

More

Packages that depend on reliable