flutter_sync_tree 1.0.5
flutter_sync_tree: ^1.0.5 copied to clipboard
A high-performance, hierarchical synchronization framework with weighted progress and throttling for Flutter.
1.0.5 #
- Optimization: Enhanced
Throttler.flushwith idempotency logic to prevent redundant event emissions.- Added a precision-based check to skip updates if the value has already reached
maxValue.
- Added a precision-based check to skip updates if the value has already reached
1.0.4 #
- Added Web Demo support with GitHub Pages.
- Improved README with live preview and architectural diagrams.
1.0.3 #
🔄 Breaking Changes #
- Naming Consistency Updates:
- SyncLeaf: Renamed
getCount(T data)togetTotalCount(T data). - SyncComposite: Renamed
isCompletetoisCompletedandgetNode()tofindNode(). - Throttler/ThrottlerConfig: Renamed
durationtointervalto better represent the time gap between updates. - RetryConfig: Renamed
lazyDelayMstobaseDelayMsto clarify it as the starting point for backoff calculations. - Logging: Renamed
SyncPrinttoSyncLogfor a more standard naming convention.
- SyncLeaf: Renamed
- SyncState: Renamed
getNode(String key)tofindNode(String key)to maintain API uniformity.
🚀 Performance & UI Optimization #
- Integrated Throttler in SyncComposite: Aggregates high-frequency progress events from multiple child nodes to optimize main thread performance.
- Jank Prevention: Ensures the root progress only dispatches updates at meaningful intervals, highly configurable via
ThrottlerConfig.
📊 Documentation & Reliability #
- Improved README Rendering: Replaced LaTeX formulas with high-compatibility ASCII/Markdown diagrams for consistent rendering across
pub.devand GitHub. - Enhanced Discoverability: Refined package metadata and descriptions to improve SEO and user guidance.
- Added "In-Depth Examples": New section in documentation providing a step-by-step guide for hierarchical synchronization logic.
- 🐞 Bug Fixes & Refactoring
- Notification Throttling: Eliminated redundant state notifications to prevent log flooding and unnecessary UI rebuilds.
- Flow Control: Introduced
canNextGenlogic inSyncSimulatorto prevent data collisions by ensuring active streams finish before the next generation. - Lifecycle Safety: Enhanced stream subscription handling in
SyncLeaffor more robust resource management duringdispose. - API Fixes: Corrected method naming in example snippets to match the updated 1.0.3 API.
1.0.2 #
🔄 Breaking Changes #
- Naming Alignment: Renamed
SyncTypetoSyncStatusfor better semantic clarity and state representation. - Stream Renaming: Renamed
syncStreamtoeventsinSyncNodeto follow standard event-driven naming conventions. - Callback Signature: Updated
OnSyncNotifyparameters to(SyncStatus status, SyncNode origin)to support source tracking.
✨ New Features #
- SyncState System: Introduced a
Sealed Classhierarchy (SyncInitial,SyncInProgress,SyncSuccess,SyncFailure,SyncPaused,SyncStopped) for easier UI integration with pattern matching. - Origin Tracking: Added the
originfield to events, allowing developers to identify exactly which child node triggered an update within complex trees.
📈 Improvements #
- UX-Focused Progress: Updated
SyncTaskStateto includelatest(up-to-date) operations in progress calculations, ensuring the progress bar reaches 100% when data is already synchronized. - Throttler Refinement: Enhanced floating-point
precisionhandling and addedfps30/fps60factory constructors for optimized UI performance. - Documentation: Revamped README with architectural diagrams, weighted progress formulas, and Riverpod integration examples.
1.0.1 #
- Minor documentation fixes.
1.0.0 #
- Initial release of flutter_sync_tree.
- Support for Hierarchical Sync Tree, Weighted Progress, and Throttling.