like 1.2.1
like: ^1.2.1 copied to clipboard
LIKE - A high-performance Network Package Build with Dio & Hive! 100% data Encrypted & Secure.
Changelog #
All notable changes to this project will be documented in this file.
1.2.1 - 2026-05-22 #
Fixed #
LikeBuilder/LikeSliverBuilderSticky Data Leak: When the state transitioned toLikeState.loading(primary loading), both builders checked_lastSuccessfulData != nulland — if true — bypassedonLoadingentirely, rendering stale data instead._lastSuccessfulDatais now reset tonullonLikeState.loadingtransitions, andonLoadingis always rendered when the state isloading, regardless of prior data.- Incorrect Initial-State Transition in
LikeAutoReconnectMixin.fetcher: The orchestration method did not differentiate between a background refresh (ars.refresh == true) and a clean/initial load. It now reads the activeLikeNotifierStatevia a Zone-bound lookup: ifars.refresh == trueand current data exists, the state transitions immediately toLikeStateResponse.refreshing(currentData); otherwise it transitions cleanly toLikeStateResponse.loading()before the request fires. - Inaccurate SWR Cache State Mapping in
LikeApiResult.toStateResponse: WhenisFromStaleWhileRevalidate == true, the converter was returning a genericLikeState.successresponse with only a boolean flag, preventing downstream listeners from detecting theLikeState.staleWhileRevalidatestate. It now returnsLikeStateResponse.staleWhileRevalidate(data, message: 'Serving from cache...')explicitly. LikeNotifierStateReactivity /.clear()Not Updating UI:LikeNotifierStatenow extendsChangeNotifierand uses a backing-field getter/setter that callsnotifyListeners()on every mutation.LikeBuilderandLikeSliverBuildersubscribe to the observed object as aListenable(if applicable), rebuild on every notification, and cancel the subscription indispose(). Calling.clear()now instantly drives the UI toonIdle/onLoadingwithout requiring an externalnotifyListeners()call.
1.2.0 - 2026-05-20 #
Added #
- Zero-Config Pipeline Synchronization: Introduced a
mapperfield onLikeNotifierState<T>. When defined,fetch()automatically registers the state as a live pipeline listener — any response for the same endpoint+query broadcast on theLikePipelineupdates the state instantly across all screens, with no extra parameters at the call site. LikePipelineMixin.bindPipeline: New zero-argument declarative method. Reads themapperfrom theLikeNotifierStateand registers the binding automatically. No endpoint string or mapper lambda needed at bind time.LikeAutoReconnectMixinPipeline Integration:fetch()now auto-wires a pipeline binding ifstate.mapperis set. BackgroundautoResyncrefresh cycles preserve the binding without re-declaring it.- Automatic Path & Query Verification: Pipeline matching extracts
endpointPathandactiveQuerydirectly from the live HTTP request viaZone-based injection inLikeClient. Both path (with prefix-matching) and query parameters are verified automatically before dispatching a pipeline update. - In-Flight Race Guard: Pipeline
processAndAssignis suppressed while a state is actively loading or refreshing (isLoading || isRefreshing), preventing concurrent writers from corrupting the state.
Changed #
- Wide SDK Support: Lowered minimum Dart SDK constraint to
>=3.0.0 <4.0.0and Flutter SDK to>=3.16.0to support older, existing, and modern projects. - Dependency Flexibility: Widened dependency constraints (such as
dio,hive,connectivity_plus,toastification, etc.) to use flexible ranges instead of high/pinned versions. This prevents dependency resolution conflicts in client projects. LikeUiConfigExtraction Reverted:minSplashDurationandauthRedirectDelaywere removed entirely fromLikeConfigandLikeConstants. A network package has no business knowing what a splash screen is.LikePipelineMixinRefactored: Internal listener management unified into a single_startPipelineListener()method.registerPipelineListenerandunregisterPipelineListenerno longer restart the stream subscription unnecessarily. When all registrations are removed, the subscription is cancelled and nulled instead of being restarted empty.AppCacheSecurity— Complete Encryption Redesign: Replaced the hardcoded 32-character AES key (LikeSecureEncryptionCacheKey1234) and static IV (LikeSecureIV1234) with a proper async lifecycle. A fresh cryptographically random 16-byte IV is generated per file and prepended to the ciphertext ([16-byte IV][AES-CBC ciphertext]).AppCacheSecurity.init()readsLikeConfig.encryptionKey(SHA-256 derived to 32 bytes) or generates a per-device key persisted inSharedPreferencesunderlike_cache_encryption_key_v2. AddedAppCacheSecurity.reset()(@visibleForTesting).LikeService.init()— Encryption First:AppCacheSecurity.init()is now called as step1a, before Hive storage initialization, guaranteeing the encrypter is ready before any file cache access occurs.AppCacheManager.getFileStreamOverride: Stream transform now (a) skips files already in thedecrypted/subdirectory, (b) calls_updateAccessTimeon every cache hit to reset the stale-period clock, and (c) auto-deletes corrupted or legacy-format files on decryption failure so they are re-downloaded correctly.AppCacheManager.clearAll— Structured Error Logging: Replaced all silentcatch (_) {}blocks with categorizedLikeLoggercalls (error/warning, category'cache_manager').LikeAutoReconnectMixin— Embedded Pipeline Listener:_pipelineSubscriptionand_pipelineBindingsare now managed directly insideLikeAutoReconnectMixin, removing the need for a separateLikePipelineMixinon providers that already use this mixin.LikeAutoReconnectMixin.checkQueryOverlap—exactParameter: Now acceptsbool exact = false. Whentrue, query maps must be identical in length and value;false(default) uses subset/overlap matching.LikeLogger— Null-Safe Map Entry Syntax: Replaced deprecated null-conditional spread (?key) with Dart collection-if syntax (if (key != null) 'key': key) inlogHttp,logRequest, andLikeService._writeToDiskCache.LikePipeline— Internal Only: Removed from the publiclike.dartbarrel export; it is an internal broadcast bus.
Fixed #
- Duplicate Pipeline Bindings:
_LikePipelineStateBindingnow implements==andhashCodevia anidentitykey. Repeated calls tobindPipelinefor the same state object replace the prior binding rather than accumulating duplicates that would fire N times per event. autoResyncLost Pipeline Binding: TherefreshActionclosure stored insidefetch()previously calledfetchwithout forwarding pipeline configuration, causing the binding to be dropped on background resync. The closure now re-registers the binding correctly.- Removed
workmanagerDependency: Fully removed theworkmanagerpackage andLikeBackgroundSyncService. The package is now platform-agnostic and runs on Flutter Web, Windows, macOS, and Linux. Offline sync is driven byLikeConnectivityManagerreacting to foreground connectivity changes. - Cryptographic Hardening: Replaced the hardcoded AES key and static IV in
AppCacheSecuritywith a per-device derived key (SHA-256) and a random IV per-file write. Cached data is now genuinely encrypted. - Registry Singleton Removed:
LikeRequestRegistryno longer uses a global singleton. EachLikeClientinstance manages its own registry, preventing state corruption when using multiple clients or running parallel tests. - Auth-Aware Offline Replay:
LikeOfflineSyncInterceptornow fetches a fresh auth token before replaying queued mutations, fixing 401 errors for long-lived offline sessions. - SWR Background Future Bug:
LikeClient._executewas not awaiting the SWR background future, silently swallowing errors. This has been corrected.
1.1.3 - 2026-05-19 #
Added #
- Repository Optimization: Updated and pointed the package source repository metadata to the dedicated documentation/repository (
https://github.com/AjayJasperJ/like_docs). - Modern SDK Support: Upgraded the package constraints to target the latest stable Dart SDK (
^3.12.0) and Flutter SDK (>=3.44.0) following system environment upgrades.
1.1.2 - 2026-05-18 #
Added #
- Multi-Screen UI Demonstration App: Added a full, robust multi-screen example application within
example/demonstrating the comprehensive integration of all core package widgets and builders (includingLikeBuilder,LikeWhen,LikeSelector,LikeSelectorSliver,LikeMultiBuilder,LikeMultiSliverBuilder,LikeCacheImage,updateNotifier, andLikeToast). - Reactive State Selectors: Supported granular UI rebuilds via
LikeSelectorandLikeSelectorSliverto observe and rebuild on precise state slices. - Combined State Observers: Introduced
LikeMultiBuilderandLikeMultiSliverBuilderto elegantly bundle and process multiple concurrent state notifier updates. - Background Isolate Parsing: Standardized
mapAsyncbackground parsing in repository layers to offload heavy JSON serialization cleanly.
1.1.1 - 2026-05-17 #
Added #
- Metadata Tuning: Updated the package description and topics in
pubspec.yamlto highlight core Dio, Hive, and AES encryption integrations for enhanced discoverability on pub.dev. - Engine Optimization: Consolidated brand-agnostic key transformations and optimized test configurations.
1.1.0 - 2026-05-17 #
Added #
- Network Mocking Engine: Integrated persistent Hive-backed mocking (
MockController) and Dio request interception (LikeMockInterceptor) for offline, testing, and staging environment simulation. - Secure Image Caching: Added transparent AES-CBC 256-bit disk encryption (
AppCacheManager,EncryptedHttpFileService) with dynamic stream-based decryption for sensitive assets. - Auto LRU Image Pruning: Implemented automatic Least Recently Used (LRU) pruning targeting size limits (
maxImageCacheMBandminImageCacheMB). LikeCacheImageWidget: Added a robust network image caching widget that removes ephemeral tracking query parameters automatically to maximize cache hits.- DevTool Integration: Added support for debug staging overlays via the new optional
devToolcallback in the rootLikewrapper. - Unified Protocols & Technical Deep Dive: Fully documented the engine's optimized Dio wrapper foundation, REST/GraphQL protocol support, offline mutation queues, background Isolate parsing, and rate limiting (HTTP 429) controls.
Fixed #
- Code Hardening & Security Audit: Audited the entire codebase to purge external branding and variables. Updated deprecated method channel testing APIs and resolved static analysis lints for 100% health.
1.0.7 - 2026-05-11 #
Added #
- Documentation: Major update to README with corrected initialization via the
Likeroot wrapper widget. - 4-Tier Roadmap: Explicitly documented Tiers 1-4 (Service, Repository, Provider, UI) with production-grade examples.
- Manual Initialization: Added
addPostFrameCallbackpattern for deferred engine setup. - Contribution: Integrated social links (GitHub, LinkedIn, Instagram) and email for community engagement.
- Visuals: Standardized package banners across all documentation using raw GitHub URLs.
1.0.6 - 2026-05-11 #
Added #
- Background Parsing: Added isolate-based JSON transformation for background processing.
- LikeBuilder Updates:
- Added support for onLoading, onError, and onSuccess callbacks.
- Added support for pagination loading states.
- Created
LikeWhenwidget for pattern matching UI.
- Reactive UI Components: Added
LikeToastfor contextless notifications andLikeNetworkImagefor caching. - Connectivity: Integrated
ConnectivityPlusfor network status monitoring. - Haptics: Added haptic feedback support.
- Async Utilities: Added
mapAsyncandmapSuccessAsyncextensions.
Fixed #
- Memory Safety: Added critical documentation on
disposepatterns to prevent background sync leaks in multi-screen applications. - Metadata: Resolved
pubspec.yamltopic limit issues for better discoverability.
1.0.5 - 2026-05-10 #
Added #
- Architecture Roadmap: Added comprehensive documentation for Clean Architecture integration covering Service, Repository, Provider, and UI layers.
- Background Parsing: Standardized
mapAsyncandmapSuccessAsyncextensions for isolate-based JSON transformation to maintain 120 FPS. - Provider Hardening: Enhanced
LikeAutoReconnectMixindocumentation with "Gold Standard" implementation patterns. - Resync Engine: Formally documented cross-notifier synchronization (
syncWith) and automated reconnection recovery (onReconnect).
Fixed #
- Memory Safety: Added critical documentation on
disposepatterns to prevent background sync leaks in multi-screen applications. - Metadata: Resolved
pubspec.yamltopic limit issues for better discoverability.
1.0.4 - 2026-05-10 #
Added #
- Multi-platform Support: Integrated
universal_ioto enable Web support while maintaining mobile/desktop parity. - Dependency Hardening: Synchronized all core packages to their latest resolvable versions for optimal security and performance.
Fixed #
- Static Analysis: Resolved all linter hints (info) across the codebase.
- Documentation: Finalized banner rendering paths.
1.0.2 - 2026-05-10 #
Fixed #
- Pub.dev Asset Loading: Switched to raw GitHub URLs for the banner to ensure correct rendering on pub.dev.
- Package Size Optimization: Added
.pubignoreto exclude thebuild/folder and other artifacts, significantly reducing the package size (from 16MB down to <1MB).
1.0.1 - 2026-05-10 #
Added #
- Visual Identity: Added a high-fidelity package banner to the README for a more professional presentation on pub.dev.
Fixed #
- Code Hardening: Fixed multiple
use_build_context_synchronouslylint issues inLikeWhento ensure UI stability during async gaps. - Style Consistency: Corrected string quoting and applied
dart formatacross the entire package (63 files) for 100% lint compliance.
1.0.0 - 2026-05-10 #
Initial Release #
- Link Intelligent Kernel Engine (LIKE): A high-performance, 4-tier caching networking package for Flutter.
- 3-Tier Caching Architecture:
- L1: RAM Cache for instantaneous session-level retrieval.
- L2: Persistent Disk Cache (Hive) for cross-session persistence.
- L3: Stale-While-Revalidate (SWR) logic for background data freshness.
- Resilience Engine:
- Automated request deduplication.
- Request suppression and cancellation logic.
- Built-in smart retry mechanism.
- Offline-First Synchronization:
- Background mutation queueing (POST/PUT/DELETE).
- Automatic synchronization when connectivity is restored.
- Notification Engine:
- Contextless high-fidelity toast notification system.
- Custom animations (Slide, Fade, Scale, Bounce).
- Swipe-to-dismiss and interactive action support.
- Performance Optimizations:
- Automatic offloading of heavy JSON parsing to background isolates.
- Efficient binary serialization for L2 disk storage.
- Reactive UI Components:
LikeBuilder: Declarative state handling for Loading, Success, SWR, and Error.LikeWhen: Streamlined pattern matching for network results.updateNotifier: Integrated side-effect handler with haptics and toast support.
- Security & Configuration:
- Support for SSL Pinning (SHA256).
- Sensitive header masking in logs.
- Comprehensive
LikeConfigwith over 80+ customization options.