syncly_flutter 0.1.0
syncly_flutter: ^0.1.0 copied to clipboard
Backend-agnostic offline synchronization with a durable SQLite outbox, retries, pulls, tombstones, and conflict handling.
0.1.0 - 2026-08-18 #
Added #
- A required
SyncTransportbackend contract with a callback-based adapter. - Real backend acknowledgement, version-aware push, and cursor-based pull flows.
- A durable SQLite outbox with persisted retry attempts, errors, and backoff times.
- Offline deletion through tombstones that remain queued until acknowledged.
SyncReport,SyncMutation, remote-record, push-result, and pull-result APIs.- Reactive
watchAllDatasnapshots for local and remote record changes. - Conflict handling for both push responses and remotely pulled changes.
- Swift Package Manager support for iOS and macOS while retaining CocoaPods compatibility.
- Apple privacy manifests declaring no tracking or data collection by the native wrapper.
- Explicit support for iOS 13.0 and macOS 10.15.
Changed #
SyncManagernow requires a real transport and never marks simulated work as synced.LocalStorage.deleteDatanow queues a durable tombstone instead of immediately losing deletion state.- The database schema is upgraded to version 4 with remote versions, tombstones, outbox entries, and pull metadata.
- Updated package constraints for the current connectivity and lint toolchains.
- Corrected CocoaPods metadata and native source layout.
- Improved connectivity subscription cleanup and reachability timeouts.
- Improved database lifecycle checks and fresh-install schema consistency.
- Corrected deep equality and hash-code behavior for
SyncData. - Updated documentation with accurate platform support and current limitations.
0.0.2 - 2025-02-11 #
Added #
- Initial implementation of offline-first data synchronization using SQLite.
- SyncManager class to manage the synchronization of local data with remote servers.
- LocalStorage class for storing unsynced and synced data in a SQLite database.
- ConnectivityMonitor to detect real internet connectivity using
connectivity_plusand DNS checks. - ConflictHandler for resolving data conflicts with customizable strategies:
lastWriteWins,serverWins,localWins,mergeFields,manual.
Features #
- Offline task creation: Users can add tasks while offline, which are automatically synced when the connection is restored.
- Real-time sync status updates using stream listeners (
SyncEvent). - Manual sync trigger option via UI for immediate data synchronization.
- Delta sync support to push only updated fields, reducing network load.
- Customizable conflict resolution strategies to handle data discrepancies.
Fixed #
- Handled scenarios where internet connection is reported as available but actual access is not possible.
- Ensured data consistency by verifying internet access with DNS lookup before attempting to sync.
- Prevented data duplication during sync retries.
Known Issues #
- Sync conflicts might not be handled properly if manual resolution logic isn't provided.
- No built-in UI for conflict resolution; developers need to implement custom UIs if
manualstrategy is used.
Usage Instructions #
- Add tasks offline and they will be saved in local storage.
- When the internet is restored, tasks automatically sync with the server.
- Use the sync button to manually trigger synchronization.
- Customize conflict resolution logic by modifying the
ConflictHandler.
Next Steps (Planned for Future Releases) #
- Add encryption for sensitive local data.
- Implement background sync for seamless data updates.
- Support for multi-device conflict resolution.
- Improve UI feedback with detailed sync progress indicators.