flint_client library
Support for doing something awesome.
More dartdocs go here.
Classes
- AIMessage
- AIProvider
- Base AI provider — stores conversation history and context memory
- BinaryResponseSerializer
- BodySerializer
- Encodes request payloads into bytes.
- CacheConfig
- Configuration for response caching
-
CachedResponse<
T> - Cached response data
- CacheStore
- Cache storage abstraction
- CancelToken
- Token used to cancel in-flight requests.
- FlintClient
- A powerful HTTP client for making requests to REST APIs with support for JSON, file uploads/downloads, progress tracking, caching, and retries.
-
FlintResponse<
T> - Represents a response from the Flint client.
- FlintWebSocketClient
- FormUrlEncodedBodySerializer
- GeminiChatCandidate
- GeminiChatContent
- GeminiChatPart
- GeminiChatResponse
- GeminiProvider
- GeminiResponse
- GeminiUsage
- HuggingFaceProvider
- HuggingFaceResponse
- JsonBodySerializer
- JsonResponseSerializer
- MemoryCacheStore
- In-memory cache implementation
- OpenAIProvider
- OpenAIResponse
- RequestContext
- Mutable request-scoped state passed across client components.
- RequestLifecycleHooks
-
RequestOptions<
T> - ResponseSerializer
- ResponseSerializerInput
- ResponseSerializerResult
- RetryConfig
- SerializedBody
- Serialized request payload with optional content type.
- StatusCodeConfig
- Configurable status code mapping that frontend devs can customize
- TextResponseSerializer
- XmlBodySerializer
Enums
- FlintErrorKind
- Structured classification for FlintError.
- FlintResponseType
- Enum representing the type of response returned by the Flint client.
- ResponseParseMode
- WebSocketConnectionState
Extensions
Typedefs
-
AuthTokenProvider
= FutureOr<
String?> Function() -
ContextualRequestInterceptor
= Future<
void> Function(HttpClientRequest request, RequestContext context) -
ContextualResponseInterceptor
= Future<
void> Function(HttpClientResponse response, RequestContext context) - ErrorHandler = void Function(FlintError error)
- Callback type for handling errors returned by FlintClient.
- HookErrorHandler = void Function(String hookName, Object error, StackTrace stackTrace, RequestContext context)
-
JsonParser<
T> = T Function(dynamic json) -
Parses JSON responses into a strongly-typed object
T. -
OnCacheHit
= FutureOr<
void> Function(RequestContext context, String cacheKey, CachedResponse cachedResponse) -
OnRequestEnd
= FutureOr<
void> Function(RequestContext context, FlintResponse? response, FlintError? error) -
OnRequestError
= FutureOr<
void> Function(RequestContext context, FlintError error, bool willRetry) -
OnRequestStart
= FutureOr<
void> Function(RequestContext context) -
OnRetry
= FutureOr<
void> Function(RequestContext context, FlintError error, Duration delay) - ProgressCallback = void Function(int sent, int total)
-
Callback type to track upload or download progress.
sentis the number of bytes sent or received.totalis the total number of bytes. -
RequestDoneCallback<
T> = void Function(FlintResponse< T> response, FlintError? error) -
RequestInterceptor
= Future<
void> Function(HttpClientRequest request) - Intercepts HTTP requests before they are sent.
-
ResponseInterceptor
= Future<
void> Function(HttpClientResponse response) - Intercepts HTTP responses after they are received.
- RetryEvaluator = bool Function(FlintError error, int attempt)
- Configuration for request retries
Exceptions / Errors
- FlintError
- Represents an error returned by the Flint client.