Pagination constructor

const Pagination({
  1. Key? key,
  2. required int numOfPages,
  3. required int selectedPage,
  4. required int pagesVisible,
  5. required Function onPageChanged,
  6. required TextStyle activeTextStyle,
  7. required ButtonStyle activeBtnStyle,
  8. required TextStyle inactiveTextStyle,
  9. required ButtonStyle inactiveBtnStyle,
  10. Icon? previousIcon,
  11. Icon? nextIcon,
  12. double? spacing,
})

Implementation

const Pagination(
    {super.key,

    /// Total number of pages
    required this.numOfPages,

    /// Current selected page
    required this.selectedPage,

    /// Number of pages visible in the widget between the previous and next buttons
    required this.pagesVisible,

    /// Callback function when a page is selected
    required this.onPageChanged,

    /// Style for the active page text
    required this.activeTextStyle,

    /// Style for the active page button
    required this.activeBtnStyle,

    /// Style for the inactive page text
    required this.inactiveTextStyle,

    /// Style for the inactive page button
    required this.inactiveBtnStyle,

    /// Icon for the previous button
    this.previousIcon,

    /// Icon for the next button
    this.nextIcon,

    /// Spacing between the individual page buttons
    this.spacing});