QudsCollectionPagination<T> constructor

const QudsCollectionPagination<T>({
  1. required int selectedPage,
  2. required List<T> currentPageItems,
  3. required Widget itemBuilder(
    1. BuildContext context,
    2. int index,
    3. T obj
    ),
  4. Widget dividerBuilder(
    1. BuildContext context,
    2. int index
    )?,
  5. required dynamic onPageChanged(
    1. int page
    ),
  6. dynamic onResultsPerPageChanged(
    1. int resultsPerPage
    )?,
  7. int resultsPerPage = 5,
  8. List<int> pageItemLengths = const [5, 10, 20, 30, 50, 100],
  9. CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.start,
  10. EdgeInsets? itemsPadding,
  11. required int total,
  12. Widget? header,
  13. Key? key,
})

Create an instance of QudsCollectionPagination.

Implementation

const QudsCollectionPagination(
    {required this.selectedPage,
    required this.currentPageItems,
    required this.itemBuilder,
    this.dividerBuilder,
    required this.onPageChanged,
    this.onResultsPerPageChanged,
    this.resultsPerPage = 5,
    this.pageItemLengths = const [5, 10, 20, 30, 50, 100],
    this.crossAxisAlignment = CrossAxisAlignment.start,
    this.itemsPadding,
    required this.total,
    this.header,
    Key? key})
    : assert(selectedPage >= 1),
      assert(total >= 0),
      assert(resultsPerPage > 0),
      super(key: key);