DioUtil class

Constructors

DioUtil()
factory
DioUtil.internal({String? baseUrl, List<Interceptor>? interceptor})

Properties

dio → Dio
no setter
hashCode int
The hash code for this object.
no setterinherited
proxyUrl String?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

cancelRequests({CancelToken? token}) → void
取消网络请求
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
request<T>(String url, {DioMethod method = DioMethod.post, Map<String, dynamic>? params, dynamic data, CancelToken? cancelToken, Options? options, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<BaseResponse>
请求类
requestNetwork<T>(String url, {DioMethod method = DioMethod.post, Map<String, dynamic>? params, dynamic data, CancelToken? cancelToken, Options? options, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, NetSuccessCallback<T?>? onSuccess, NetErrorCallback? onError}) Future<BaseResponse>
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

getInstance({String? baseUrl, List<Interceptor>? interceptor}) DioUtil