fl_smart_http 1.0.1
fl_smart_http: ^1.0.1 copied to clipboard
Flutter HTTP client with AES-256-GCM encrypted caching, offline support, priority request queue, interceptors, retry back-off, rate limiting, and DI support via IFlSmartHttp.
Changelog #
All notable changes to fl_smart_http will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.0.1 - 2026-03-29 #
Changed #
- Updated
connectivity_plusto^7.0.0for latest platform support - Updated
pointycastleto^4.0.0(latest version) - Removed
encryptpackage dependency — now using purepointycastlefor AES-256-GCM encryption (reduces dependencies) - Removed web platform support — isolates required for encryption are not available on web
- Added
analysis_options.yamlwith stricter lint rules for better code quality - Added
initWithPathmethod toFlCacheStorefor easier testing
Fixed #
- Fixed missing
@overrideannotation onrotateEncryptionKeymethod - Fixed string concatenation to use interpolation in
LoggingInterceptor - Fixed for-loop to use curly braces in
_powmethod - Added proper
library;directives to library files
1.0.0 - 2026-03-29 #
Added #
- Core HTTP client (
FlSmartHttp) with singleton and isolated-instance factory (FlSmartHttp.create) - Five caching strategies:
cacheFirst,networkFirst,staleWhileRevalidate,networkOnly,cacheOnly - AES-256-GCM encrypted cache via
enableEncryption+encryptionKeyinFlHttpConfig - PBKDF2-HMAC-SHA256 key derivation with configurable salt and iterations
- Offline support — serve stale cache entries when device is offline (
serveStaleOnOffline) - Request queue with priority ordering (
RequestPriority.high/normal/low), concurrency limits (maxConcurrentRequests), and queue size cap (maxQueueSize) - Cancellation tokens (
CancellationToken) — cancel individual, grouped, or all requests - Queue control —
pauseQueue(),resumeQueue(), real-timequeueStatusstream - Interceptors —
HttpInterceptorbase class,LoggingInterceptor,AuthRefreshInterceptor - Rate limiting —
maxRequestsPerSecondandmaxRequestsPerMinuteconfiguration - Model registry — register
fromJsonfactories once viaFlSmartHttp.registerModel<T>() - Retry with exponential back-off — configurable attempts, base delay, max delay, jitter
- Server cache header support — honours
Cache-Control: max-age,no-store,no-cache - LRU cache eviction —
maxCacheEntrieswithonCacheLimitWarningcallback - Cache migration —
FlSmartHttp.migrateCache(oldBoxName, config)for version upgrades - Cache prewarming —
prewarm(endpoint, body)to seed cache before first network call - Vary-header support — per-user caching via
varyHeadersconfig - DI interface (
IFlSmartHttp) for easy mocking in unit tests - Diagnostics —
diagnostics()returns cache stats, strategy, connectivity, queue state - Connectivity stream —
connectivityStreambroadcasts online/offline transitions - Full
copyWithonFlHttpConfigfor easy per-request or per-client overrides FlResponse<T>— unified type-safe response withdata,rawBody,source,elapsed,expiresAt
