DioManager class

Constructors

DioManager()
factory

Properties

configInterceptor OnRequestInterceptor?
获取dio配置拦截器
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addInterceptor({required InterceptorType type, required dynamic interceptor}) → void
添加拦截器 type 拦截器类型 interceptor 子拦截器
asyncRequest({required Retrofit retrofit, Map<String, String>? headers, Map<String, dynamic>? params, OnResponseErrorCall? errorCall, OnResponseCompleteCall? completeCall}) Future<Map<String, dynamic>>
asyncRequestString({required Retrofit retrofit, Map<String, String>? headers, Map<String, dynamic>? params, OnResponseStringErrorCall? errorCall, OnResponseCompleteCall? completeCall}) Future<String>
bindMethods() → void
download({required String url, required dynamic successCall(String path), OnProcessCall? processCall, OnResponseCompleteCall? completeCall}) → void
文件下载 url 文件网络地址 fileName 下载至本地文件名 completeCall 请求完成后回调
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
request({required Retrofit retrofit, Map<String, String>? headers, Map<String, dynamic>? params, OnResponseSuccessCall? successCall, OnResponseErrorCall? errorCall, OnResponseCompleteCall? completeCall}) → void
网络请求实例 retrofit 请求对象 params 请求参数 responseCall 响应回调
requestString({required Retrofit retrofit, Map<String, String>? headers, Map<String, dynamic>? params, OnResponseStringSuccessCall? successCall, OnResponseStringErrorCall? errorCall, OnResponseCompleteCall? completeCall, bool enableIntervalRefresh = true}) → void
网络请求实例 retrofit 请求对象 params 请求参数 responseCall 响应回调
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

instance DioManager
no setter