onPaginationLoad method

void onPaginationLoad({
  1. required bool isFirst,
  2. C? cursor,
})

Implementation

void onPaginationLoad({required bool isFirst, C? cursor}){
  if(bloc == null) return;
  if (isFirst == true || (widget.enablePagination == true && !curModel.isLoading() && curModel.reachedEnd != true)) {
    if(isFirst != true && curModel.data != null && curModel.data!.length < (widget.minimumPaginateCount ?? 5)) {
      return;
    }
    curModel.paginationLoading = true;
    bloc!.startPaginationLoading(isFirst, curModel.data, cursor, onLoadComplete: controller._onLoadComplete);
  }
}