requestData method
请求数据
Implementation
@override
void requestData(RefreshType type, int page) async {
if (type == RefreshType.refresh || type == RefreshType.first) {
list.clear();
}
List<T>? data = await requestDataList(page);
var isLastPage = true;
if (data != null && data.isNotEmpty) {
list.addAll(data);
if (data.length >= pageSize()) {
isLastPage = false;
}
}
onSuccess(type, isLastPage);
}