flint_client_io
library
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.
sent is the number of bytes sent or received.
total is 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.