post method

dynamic post(
  1. Map<int, String> mapUrl, {
  2. dynamic data,
  3. Map<String, dynamic>? queryParameters,
  4. Options? options,
  5. QuestSuccess? onSuccess,
  6. QuestFailed? onFiled,
  7. 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);
}