isFirstPage method

bool isFirstPage(
  1. Map<String, dynamic> response
)

是否首页数据

Implementation

bool isFirstPage(Map<String, dynamic> response) {
  if (response.isEmptyMap()) {
    return true;
  }
  var fieldName = DioManager.instance.configInterceptor?.isFirstPageKey() ?? "";
  var isFirstPage = response[fieldName];
  if (isFirstPage is! bool) {
    return true;
  }
  return isFirstPage;
}