philiprehberger_sync_engine 0.4.0
philiprehberger_sync_engine: ^0.4.0 copied to clipboard
Offline-first data sync with conflict resolution, retry queues, and local caching
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased] #
0.4.0 - 2026-04-11 #
Added #
SyncRecord.toJson()andSyncRecord.fromJson()for JSON serializationSyncRecord.withData()copy method for updating the data payloadStoreStatistics.toJson()andStoreStatistics.fromJson()for JSON serializationSyncError.toJson()andSyncError.fromJson()for JSON serializationSyncResult.toJson()andSyncResult.fromJson()for JSON serialization
Fixed #
- Barrel file structure: primary barrel is now
lib/philiprehberger_sync_engine.dart - README requirements version corrected from 3.5 to 3.6
0.3.0 - 2026-04-03 #
Added #
SyncEngine.onBeforeSynchook — fires before sync, returnfalseto cancelSyncEngine.onAfterSynchook — fires after sync withSyncResultSyncEngine.onConflicthook — fires when a conflict is detectedSyncErrorclass for structured error reportingSyncResult.errorslist ofSyncErrorobjectsSyncResult.hasErrorsconvenience getter
0.2.0 - 2026-04-02 #
Added #
SyncRecord.tagsfor categorizing recordsLocalStore.queryByTag()for filtering by tag- Exponential backoff in
RetryQueuewith configurable base and multiplier RetryQueue.nextDelay()to calculate backoff delaySyncMetadataclass for tracking sync statisticsSyncEngine.syncWhere()for selective sync by predicateSyncEngine.metadatafor cumulative sync stats
0.1.0 - 2026-04-01 #
Added #
- Initial release
- SyncRecord model with status tracking and versioning
- In-memory LocalStore with CRUD, query, and statistics
- ConflictResolver with remoteWins, localWins, latestWins, and custom strategies
- RetryQueue with configurable max attempts
- SyncEngine coordinator with push, pull, conflict resolution, and progress callbacks
- SyncResult for tracking sync operation outcomes