requestList<T, E> method

Future<HttpData<T>> requestList<T, E>(
  1. dynamic handleHttpData(
    1. HttpData data,
    2. RequestInfo requestInfo
    ),
  2. {bool isSetError = true}
)

通常有下拉刷新请求,第一页之后不会再设置页面错误状态

Implementation

Future<HttpData<T>> requestList<T, E>(
    handleHttpData(HttpData data, RequestInfo requestInfo),
    {bool isSetError = true}
) async{

  doOther();
  RequestInfo requestInfo = getRequestInfo();
  HttpData<T> httpData = await doRequestList<T, E>(requestInfo);

  _handleHttpData<T>(
      handleHttpData,
      httpData,
      requestInfo,
      isSetError
  );
  return httpData;
}