DioMixin class

Implemented types
Implementers

Constructors

DioMixin()

Properties

httpClientAdapter HttpClientAdapter
read / write, override
interceptors Interceptors
read-only, override
options BaseOptions
Default Request config. More see BaseOptions.
read / write, override
transformer Transformer
transformer allows changes to the request/response data before it is sent/received to/from the server This is only applicable for request methods 'PUT', 'POST', and 'PATCH'.
read / write, override
hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

assureDioError(dynamic err, [RequestOptions requestOptions]) DioError
assureResponse<T>(dynamic response, [RequestOptions requestOptions]) Response<T>
checkCancelled(CancelToken cancelToken) → void
checkIfNeedEnqueue(Lock lock, EnqueueCallback callback) → FutureOr
checkOptions(dynamic method, dynamic options) Options
clear() → void
Clear the current Dio instance waiting queue.
override
close({bool force: false}) → void
Shuts down the dio client. [...]
override
delete<T>(String path, {dynamic data, Map<String, dynamic> queryParameters, Options options, CancelToken cancelToken}) → Future<Response<T>>
Handy method to make http DELETE request, which is a alias of BaseDio.request.
override
deleteUri<T>(Uri uri, {dynamic data, Options options, CancelToken cancelToken}) → Future<Response<T>>
Handy method to make http DELETE request, which is a alias of BaseDio.request.
override
download(String urlPath, dynamic savePath, {ProgressCallback onReceiveProgress, Map<String, dynamic> queryParameters, CancelToken cancelToken, bool deleteOnError: true, String lengthHeader: Headers.contentLengthHeader, dynamic data, Options options}) → Future<Response>
Download the file and save it in local. The default http method is 'GET', you can custom it by Options.method. [...]
override
downloadUri(Uri uri, dynamic savePath, {ProgressCallback onReceiveProgress, CancelToken cancelToken, bool deleteOnError: true, String lengthHeader: Headers.contentLengthHeader, dynamic data, Options options}) → Future<Response>
Download the file and save it in local. The default http method is 'GET', you can custom it by Options.method. [...]
override
get<T>(String path, {Map<String, dynamic> queryParameters, Options options, CancelToken cancelToken, ProgressCallback onReceiveProgress}) → Future<Response<T>>
Handy method to make http GET request, which is a alias of BaseDio.request.
override
getUri<T>(Uri uri, {Options options, CancelToken cancelToken, ProgressCallback onReceiveProgress}) → Future<Response<T>>
Handy method to make http GET request, which is a alias of BaseDio.request.
override
Handy method to make http HEAD request, which is a alias of BaseDio.request.
override
headUri<T>(Uri uri, {dynamic data, Options options, CancelToken cancelToken}) → Future<Response<T>>
Handy method to make http HEAD request, which is a alias of BaseDio.request.
override
listenCancelForAsyncTask<T>(CancelToken cancelToken, Future<T> future) → Future<T>
lock() → void
Lock the current Dio instance. [...]
override
mergeOptions(Options opt, String url, dynamic data, Map<String, dynamic> queryParameters) RequestOptions
patch<T>(String path, {dynamic data, Map<String, dynamic> queryParameters, Options options, CancelToken cancelToken, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress}) → Future<Response<T>>
Handy method to make http PATCH request, which is a alias of BaseDio.request.
override
patchUri<T>(Uri uri, {dynamic data, Options options, CancelToken cancelToken, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress}) → Future<Response<T>>
Handy method to make http PATCH request, which is a alias of BaseDio.request.
override
post<T>(String path, {dynamic data, Map<String, dynamic> queryParameters, Options options, CancelToken cancelToken, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress}) → Future<Response<T>>
Handy method to make http POST request, which is a alias of BaseDio.request.
override
postUri<T>(Uri uri, {dynamic data, Options options, CancelToken cancelToken, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress}) → Future<Response<T>>
Handy method to make http POST request, which is a alias of BaseDio.request.
override
put<T>(String path, {dynamic data, Map<String, dynamic> queryParameters, Options options, CancelToken cancelToken, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress}) → Future<Response<T>>
Handy method to make http PUT request, which is a alias of BaseDio.request.
override
putUri<T>(Uri uri, {dynamic data, Options options, CancelToken cancelToken, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress}) → Future<Response<T>>
Handy method to make http PUT request, which is a alias of BaseDio.request.
override
reject<T>(dynamic err) → Future<Response<T>>
Assure the final future state is failed!
override
request<T>(String path, {dynamic data, Map<String, dynamic> queryParameters, CancelToken cancelToken, Options options, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress}) → Future<Response<T>>
Make http request with options. [...]
override
requestUri<T>(Uri uri, {dynamic data, CancelToken cancelToken, Options options, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress}) → Future<Response<T>>
Make http request with options. [...]
override
resolve<T>(dynamic response) → Future<Response<T>>
Assure the final future state is succeed!
override
unlock() → void
Unlock the current Dio instance. [...]
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited