fl_smart_http 1.0.1 copy "fl_smart_http: ^1.0.1" to clipboard
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_plus to ^7.0.0 for latest platform support
  • Updated pointycastle to ^4.0.0 (latest version)
  • Removed encrypt package dependency — now using pure pointycastle for AES-256-GCM encryption (reduces dependencies)
  • Removed web platform support — isolates required for encryption are not available on web
  • Added analysis_options.yaml with stricter lint rules for better code quality
  • Added initWithPath method to FlCacheStore for easier testing

Fixed #

  • Fixed missing @override annotation on rotateEncryptionKey method
  • Fixed string concatenation to use interpolation in LoggingInterceptor
  • Fixed for-loop to use curly braces in _pow method
  • 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 + encryptionKey in FlHttpConfig
  • 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 controlpauseQueue(), resumeQueue(), real-time queueStatus stream
  • InterceptorsHttpInterceptor base class, LoggingInterceptor, AuthRefreshInterceptor
  • Rate limitingmaxRequestsPerSecond and maxRequestsPerMinute configuration
  • Model registry — register fromJson factories once via FlSmartHttp.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 evictionmaxCacheEntries with onCacheLimitWarning callback
  • Cache migrationFlSmartHttp.migrateCache(oldBoxName, config) for version upgrades
  • Cache prewarmingprewarm(endpoint, body) to seed cache before first network call
  • Vary-header support — per-user caching via varyHeaders config
  • DI interface (IFlSmartHttp) for easy mocking in unit tests
  • Diagnosticsdiagnostics() returns cache stats, strategy, connectivity, queue state
  • Connectivity streamconnectivityStream broadcasts online/offline transitions
  • Full copyWith on FlHttpConfig for easy per-request or per-client overrides
  • FlResponse<T> — unified type-safe response with data, rawBody, source, elapsed, expiresAt
1
likes
160
points
51
downloads
screenshot

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

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.

Repository (GitHub)
View/report issues

Topics

#http #networking #caching #encryption #offline

Funding

Consider supporting this project:

github.com

License

MIT (license)

Dependencies

connectivity_plus, flutter, hive, hive_flutter, http, pointycastle

More

Packages that depend on fl_smart_http