ts_api_handler
library
Classes
APICacheDBModel
ApiCacheHelper
A class responsible for managing caching of API data.
ApiConfig
Everything ApiServices needs, in one object.
ApiLogOptions
Controls what the console logger prints for each request.
ApiObserver
A single place to watch every request the package makes — for crash
reporting, analytics, or a debug overlay.
ApiServices
A typed HTTP client wrapping Dio. All methods return Either<Failure, Response> —
use .fold(onLeft, onRight) to handle errors and successes without exceptions.
AuthConfig
Token-based authentication settings for ApiServices.
Base64LogTrimmer
Collapses base64 blobs out of the logger's output.
CancelToken
Controls cancellation of Dio's requests.
Either <L , R >
Represents a value of one of two possible types, Left or Right .
FormData
A class to create readable "multipart/form-data" streams.
It can be used to submit forms and file uploads to http server.
Left <L , R >
MultipartFile
An upload content that is a part of MultipartRequest.
This doesn't need to correspond to a physical file.
RequestOptions
The internal request option class that is the eventual result after
BaseOptions and Options are composed.
Response <T >
The Response class contains the payload (could be transformed)
that respond from the request, and other information of the response.
RetryPolicy
Controls how transient failures are retried by NetworkRetryInterceptor.
Right <L , R >
UploadFile
One file in a multipart upload.
Functions
listParser <T > (T fromJson (Map <String , dynamic > json ), {String ? key })
→ List <T > Function(dynamic data )
Turns a single-object parser into one that reads a JSON array, for the
common list endpoint.
Exceptions / Errors
Failure
Represents a failure from ApiServices , carrying the error type, HTTP/internal
code, and a human-readable message.