opinionated_pagination 1.0.0 copy "opinionated_pagination: ^1.0.0" to clipboard
opinionated_pagination: ^1.0.0 copied to clipboard

outdated

A very opinionated ellipsis pagination solution for Flutter. It provides a row of widgets with 7 buttons to control pagination. Designed with Riverpod in mind, but should work with your state manageme [...]

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 #

  1. Install the package: flutter pub add opinionated_pagination
  2. 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;
      });
    }
  },
);

A more fully formed example can be found on the example page

7
likes
0
pub points
0%
popularity

Publisher

verified publisherbroadwood.dev

A very opinionated ellipsis pagination solution for Flutter. It provides a row of widgets with 7 buttons to control pagination. Designed with Riverpod in mind, but should work with your state management solution of choice.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on opinionated_pagination