flutter_network_plus 0.1.0
flutter_network_plus: ^0.1.0 copied to clipboard
An enterprise-grade, Dio-free networking foundation for Flutter: pluggable transport adapters, JWT auto-refresh with request queueing, smart retries, circuit breaker, TTL cache with stale-while-revali [...]
Changelog #
All notable changes to this project are documented in this file. The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
0.1.0 #
Initial release.
Added #
- Transport — a Dio-free
HttpClientAdapterabstraction with adart:iodefault (IoHttpClientAdapter) and aMockHttpClientAdapterfor tests. - Typed results — sealed
NetworkResult<T>(NetworkSuccess/NetworkFailure) and a sealedNetworkExceptionhierarchy for exhaustive pattern matching. - Verbs —
get,post,put,patch,delete,send, plus multipartuploadwith progress and a resumabledownloadmanager. - Interceptor pipeline with short-circuit control
(
next/resolve/reject/retry). - Auth — JWT/OAuth refresh-token flow with single-flight refresh, pending-request queueing, proactive expiry refresh, and pluggable secure token storage.
- Reliability — smart retry policy with exponential backoff and
jitter,
Retry-Aftersupport, a circuit breaker, and per-phase timeouts. - Caching — memory and disk stores with TTL and five cache policies including stale-while-revalidate.
- Offline — a persistent request queue with connectivity-aware automatic replay.
- Security — SSL pinning (certificate and SPKI), HMAC request signing, and a credential-redacting cURL generator.
- Observability — a network inspector timeline, analytics / Crashlytics / OpenTelemetry-style observer hooks, and pluggable logging.
- Environments — named environments with runtime switching.
Known limitations #
- Web is not supported in this release (the transport, disk cache, and
offline queue depend on
dart:io). - OAuth covers the refresh-token flow only; authorization-code/PKCE is out of scope.