setTotalItems method

void setTotalItems(
  1. int total
)

Update total items count

Implementation

void setTotalItems(int total) {
  Transaction.run(() {
    _state.value = _state.value.copyWith(
      totalItems: total,
      hasMore: _state.value.currentPage * _pageSize < total,
    );
  });
}