itemsOnPage method

int itemsOnPage(
  1. int totalItems
)

Returns the number of items on the current page.

Implementation

int itemsOnPage(int totalItems) {
  if (totalItems < 1) return 0;
  final (start, end) = getSliceBounds(totalItems);
  return end - start;
}