opinionated_pagination

Last updated:

0 purchases

opinionated_pagination Image
opinionated_pagination Images
Add to Cart

Description:

opinionated pagination

This is a pagination library that:

manages your pagination navigation for you
automatically calculates what page you are on, and what buttons to show
is very lightweight and generic
supports all Flutter platforms
works with any state management solution
is very opinionated

Getting started #

Install the package: flutter pub add opinionated_pagination
Have at it

Usage #
Basic example using setState

int paginationPage = 0;
final int limit = 5;
final int itemCount = 120;
final _pageGroupEnd = (paginationPage + 1) * limit;
final _pageGroupStart = _pageGroupEnd - (limit - 1);
var widget = OpinionatedPagination(
pageNumber: paginationPage,
totalItems: itemCount,
skip: paginationPage,
limit: limit,
onPageChanged: (int? i) {
if (i != null) {
setState(() {
paginationPage = i;
});
}
},
);
copied to clipboard
A more fully formed example can be found on
the example page

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.