netra_flutter 1.0.2
netra_flutter: ^1.0.2 copied to clipboard
A Flutter networking plugin with offline queueing, slow network strategies, smart caching, circuit breaker, multipart uploads, and event-driven observability. Built on top of OkHttp via a native Andro [...]
Changelog #
1.0.2 #
- Added exception param to RequestFailed and QueuedRequestFailed events.
1.0.1 #
Updates readme documentation.
1.0.0 #
- Promoted Netra Flutter from alpha to stable.
- Improved observer handling for multi-client scenarios.
- API considered stable for production usage.
0.1.0-alpha #
Initial alpha release.
Features #
- HTTP Methods — GET, POST, PUT, PATCH, DELETE support via a clean async/await API
- Streaming —
getStreamfor chunk-by-chunk consumption of large responses (images, files, audio) - Multipart Upload — file and binary upload support via
RequestBody.multipart - Offline Policies — configurable behavior when the device is offline:
queue— persist request to disk, retry automatically when connection is restoredretry— retry N times with configurable intervaluseCache— serve cached response as fallbackthrowError— immediately surface the network error
- Slow Network Policies — configurable behavior on degraded connections:
timeout— enforce a strict call timeoutwait— delay the request by a given durationuseCache— return cached response immediately
- Smart Cache — memory + disk cache with TTL support; reports hit, miss, stored, expired, and stale-used events
- Offline Queue Restoration — queued requests are automatically retried when connectivity is restored, powered by Room on the Android side
- Event-Driven Observers — subscribe to request, cache, queue, and network lifecycle events via
on()/off() - Converter Support — Gson, KotlinX Serialization, Moshi
- Circuit Breaker — configurable failure threshold and retry delay
- Per-Request Headers — headers can be set globally on the client or per request
- Cancel on Dispose — requests marked with
cancelOnDispose: trueare automatically cancelled when the widget is disposed
Platform Support #
| Platform | Support |
|---|---|
| Android | ✅ |
| iOS | 🔜 Planned |