Pagination
Page selection and navigation control.
File: example/lib/widgets/pagination.dart
Factory Methods
FBPagination.basic()- Simple page numbersFBPagination.dots()- Dot indicatorsFBPagination.arrows()- Previous/Next arrowsFBPagination.custom()- Custom pagination
Properties
currentPage: int
totalPages: int
onPageChanged: Function(int)
previousLabel: String
nextLabel: String
activeColor: Color
inactiveColor: Color
Usage Example
FBPagination.basic(
currentPage: currentPage,
totalPages: 10,
onPageChanged: (page) => setState(() => currentPage = page),
)
Image Gallery
Column(
children: [
Image.asset('images/image${currentPage}.jpg'),
SizedBox(height: 16),
FBPagination.dots(
currentPage: currentPage,
totalPages: 5,
onPageChanged: (page) => setState(() => currentPage = page),
),
],
)