Pagination constructor
const
Pagination({
- Key? key,
- required int numOfPages,
- required int selectedPage,
- required int pagesVisible,
- required Function onPageChanged,
- required TextStyle activeTextStyle,
- required ButtonStyle activeBtnStyle,
- required TextStyle inactiveTextStyle,
- required ButtonStyle inactiveBtnStyle,
- Icon? previousIcon,
- Icon? nextIcon,
- 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});