network_api_sdk library

Public entry point for the network_api_sdk package.

Import this library to access the supported package surface, including Sdk, SdkConfig, authentication helpers, interceptors, request models, and offline extension points.

Classes

AuthManager
Manages token caching, persistence, and single-flight refreshes.
AuthOptions
Configures the SDK's built-in authentication endpoints and token mapping.
BodyFile
Represents one multipart file field.
CacheStore
Stores cached response payloads for offline GET fallbacks.
DioHttpClient
Default HttpClient implementation backed by package:dio.
FileCacheStore
File-backed CacheStore implementation.
FileQueueStore
File-backed QueueStore that persists queued requests as JSON.
HttpClient
Transport abstraction used by the SDK.
HttpRequest
Raw transport request sent through an HttpClient.
HttpResponse
Raw transport response returned by an HttpClient.
MemoryCacheStore
In-memory CacheStore implementation.
MemoryQueueStore
In-memory QueueStore implementation.
OutputOptions
Creates output normalization settings for the SDK.
QueuedRequest
Wraps an HttpRequest for offline queue persistence.
QueueStore
Persists write requests that should be flushed later.
RequestBody
Represents a request payload sent through the SDK call API.
Sdk
Global SDK entry point.
SdkConfig
Configures SDK initialization.
SdkContract
Describes how the SDK should interpret a backend response contract.
SdkError
Describes an SDK failure in a transport-agnostic way.
SdkEvents
Broadcasts SDK lifecycle events to listeners.
SdkInterceptor
Hook points that can observe or mutate SDK requests and responses.
SdkProfile
Controls the SDK's built-in offline cache and request queue behavior.
SdkResponse
Represents the normalized result returned by the SDK request APIs.
SecureTokenStore
Stores SDK tokens in flutter_secure_storage.
TokenPair
Holds the access and refresh tokens for an authenticated session.
TokenStore
Persists authentication tokens for the SDK.

Enums

BodyType
Declares how a RequestBody should be encoded by an HTTP client.
BytesJsonMode
Controls how the SDK normalizes transport responses.
ErrorType
Categorizes SDK errors.
ResponseSource
Describes where a response was produced from.
ResponseTypeHint
Hints how the HTTP client should request the response payload.
SdkEvent
SDK lifecycle events emitted through SdkEvents.

Typedefs

IsBodySuccess = bool Function(Map<String, dynamic> json, int? statusCode)
Evaluates whether a decoded response body represents success.
RefreshExecutor = Future<TokenPair?> Function(TokenPair current)
Executes a token refresh using the current stored TokenPair.