post method
dynamic
post(
- Map<
int, String> mapUrl, { - dynamic data,
- Map<
String, dynamic> ? queryParameters, - Options? options,
- QuestSuccess? onSuccess,
- QuestFailed? onFiled,
- QuestError? onError,
Implementation
post(Map<int, String> mapUrl, {dynamic data, Map<String, dynamic>? queryParameters, Options? options, QuestSuccess? onSuccess, QuestFailed? onFiled, QuestError? onError}) async {
TbHttpUtils.instance.post(mapUrl.url, mapUrl.taskId,
data: data,
queryParameters: queryParameters,
token: token,
options: options,
onSuccess: onSuccess ??
(result, taskId) {
mState?.mQuestStatus = QuestStatus.ok;
resultData(result, taskId);
update();
if (isLoadMore) {
mState?.mRefreshController.finishLoad(success: true);
}
if (isRefresh) {
mState?.mRefreshController.finishRefresh(success: true);
}
},
onFiled: onFiled ?? failedHandle,
onError: onError ?? errorHandle,
isShowLoading: mIsShowLoading);
}