discontinuedPackage webapp has been discontinued and replaced by finch.

start property

int get start

Calculates the starting index for the current page based on page and pageSize.

The start index is adjusted if the page exceeds the total number of items.

Implementation

int get start {
  var start = (page - 1) * pageSize;
  if (start >= total) {
    start =
        total % pageSize == 0 ? total - pageSize : total - (total % pageSize);
  }
  return start;
}