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