BaseRefreshApi<T> class abstract

Inheritance
Mixed-in types

Constructors

BaseRefreshApi({String path = '', Options? opt, dynamic param, int page = 1, int pageSize = 10, IsEmptyList<T>? isEmptyList, String? listKey, String? pageNumKey, String? pageSizeKey, Map<String, dynamic>? queryParameters, bool showToast = true, bool showLoading = true, TransformJson<T>? serializer})

Properties

canShowLoading bool
getter/setter pairinherited
canShowToast bool
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, dynamic>?
request header
getter/setter pairinherited
isDebug bool
getter/setter pairinherited
isEmptyList IsEmptyList<T>?
自定义判空逻辑
getter/setter pair
isEncrypt bool
getter/setter pairinherited
isOnLoad bool
是否加载更多
getter/setter pairinherited
listKey String?
列表模型解析key , 支持点语法KeyPath 取值
getter/setter pair
loadingMsg String
getter/setter pairinherited
opt Options
请求配置
getter/setter pairinherited
page int
getter/setter pair
pageNumKey String?
getter/setter pair
pageParamName String
分页参数key
no setterinherited
pageSize int
getter/setter pair
pageSizeKey String?
getter/setter pair
pageSizeParamName String
分页参数key
no setterinherited
param ↔ dynamic
request body for post/put/...
getter/setter pairinherited
path String
request path
getter/setter pairinherited
queryParameters Map<String, dynamic>?
request param for get
getter/setter pairinherited
result BaseModel<T>
BaseModel witch is tramsfrom by response data
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
serializer TransformJson<T>?
根据 BaseModel.result 内省结果, 完成相应的模型转换
getter/setter pairinherited

Methods

custom() Future<Response>
inherited
decryptedAes(dynamic data) → dynamic
inherited
dimiss() → void
inherited
dispatch() Future<BaseModel<T>>
约定: dispatch().then 代表 网络&业务逻辑 都是成功
override
encrypt(RequestOptions options) → dynamic
inherited
loadComplete() → void
上拉加载完成
inherited
loadFailed() → void
上拉加载失败
inherited
loadNoData() → void
没有更多数据
inherited
networkError(DioException error) → void
网络错误处理
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onResponseError(BaseModel res) → void
服务端返回错误
inherited
refreshCompleted() → void
刷新完成
inherited
refreshFailed() → void
刷新失败
inherited
requestBaseUrl() String
请求地址
inherited
requestHeader() Map<String, dynamic>
请求头
inherited
serializerJson() → void
模型解析
override
showLoading() → void
inherited
showToast({String msg = '加载失败'}) → void
inherited
toString() String
A string representation of this object.
inherited
transformModelFromResponseData<T>(Map responseData) BaseModel<T>
解析请求结果
inherited
updateParam(Map? extra) → void
更新请求参数

Operators

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