network library
Classes
-
ApiFailure<
T> - Represents a failed request.
-
ApiLoading<
T> - Represents a loading / in-flight request.
-
ApiResponse<
T> - A discriminated union modelling the three states of an asynchronous API call: loading, success, and failure.
-
ApiSuccess<
T> - Represents a successfully completed request.
- ConnectivityMonitor
- Monitors network connectivity and exposes a debounced stream of connection-state changes.
- FlushCompletedEvent
- Emitted when a flush cycle completes.
- FlushStartedEvent
- Emitted when a flush cycle starts.
- OfflineQueue
- OfflineQueueEvent
- Discriminated union of events emitted by OfflineQueue.
- PrimekitNetworkClient
-
A pre-configured
DioHTTP client for Primekit-powered applications. - QueuedRequest
- Represents an HTTP request that has been enqueued for later execution.
- RequestDroppedEvent
- Emitted when a request fails after exhausting its retry budget.
- RequestEnqueuedEvent
- Emitted when a request is added to the queue.
- RequestFlushedEvent
- Emitted when a queued request executes successfully.
- RetryInterceptor
-
A Dio
Interceptorthat automatically retries failed requests with exponential backoff.
Typedefs
-
RequestExecutor
= Future<
void> Function(QueuedRequest request) - Buffers HTTP requests while the device is offline and replays them in order when connectivity is restored.