Skip to content

Add generic pagination support for custom scrollables (customBuilder) #1

Open
Hensell wants to merge 2 commits intoKal-Elx:mainfrom
Hensell:feature/generic-pagination
Open

Add generic pagination support for custom scrollables (customBuilder) #1
Hensell wants to merge 2 commits intoKal-Elx:mainfrom
Hensell:feature/generic-pagination

Conversation

@Hensell
Copy link
Copy Markdown

@Hensell Hensell commented Jul 6, 2025

This PR adds support for pagination with custom scrollable widgets through a new customBuilder parameter in the Paginated widget.

What’s new

  • You can now use Paginated with any custom scrollable (such as LazyWrap, masonry layouts, or any builder-based widget) by providing a customBuilder, along with itemCount and itemBuilder.
  • The original API and behavior for ListView, GridView, SliverList, and SliverGrid are fully preserved and backwards compatible.
  • No breaking changes: existing usage does not need to be updated.

Why is this useful?

  • Many Flutter projects use custom scrollable widgets that aren’t covered by the default ListView/GridView types.
  • With this PR, users can easily add pagination, loading indicators, and error handling to any scrollable that follows the builder pattern, without writing boilerplate code.
  • This brings greater flexibility and wider adoption potential for the package, while keeping the classic usage as simple as before.

Other notes

If needed, I’m happy to add examples of custom usage to the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant