Pagination constructor

const Pagination({
  1. Key? key,
  2. required int currentPage,
  3. required int totalPages,
  4. required dynamic onPageChanged(
    1. int
    ),
})

Take in parameter the current page , the total of pages, and the function on change of page

Implementation

const Pagination({
  super.key,
  required this.currentPage,
  required this.totalPages,
  required this.onPageChanged,
});