computeItemsPerPageOptions method

List<int> computeItemsPerPageOptions(
  1. List<int> options
)

Implementation

List<int> computeItemsPerPageOptions(List<int> options) {
  if (totalItems == 0) return [];

  return <int>{computedItemsPerPage, ...options}.where((x) => x <= totalItems && x > 0).toList()..sort();
}