Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does it support multiple SliverList? #333

Open
aboyo opened this issue Jun 19, 2024 · 2 comments
Open

Does it support multiple SliverList? #333

aboyo opened this issue Jun 19, 2024 · 2 comments
Labels
question Support request

Comments

@aboyo
Copy link

aboyo commented Jun 19, 2024

Hi,
I want to place two SliverList in a CustomScrollView, and start loading the second SliverList when I scrolls to the bottom.

CustomScrollView(
        slivers: <Widget>[
          BeerSearchInputSliver(
            onChanged: (searchTerm) => _updateSearchTerm(searchTerm),
          ),
          PagedSliverList<int, BeerSummary>(
            pagingController: _pagingController,
            builderDelegate: PagedChildBuilderDelegate<BeerSummary>(
              animateTransitions: true,
              itemBuilder: (context, item, index) => BeerListItem(
                beer: item,
              ),
            ),
          ),
         PagedSliverList<int, BeerSummary>(
            pagingController: _pagingController2,
            builderDelegate: PagedChildBuilderDelegate<BeerSummary>(
              animateTransitions: true,
              itemBuilder: (context, item, index) => BeerListItem(
                beer: item,
              ),
            ),
          ),
        ],
      );

Does it support multiple SliverList?

thx!

@clragon clragon added the question Support request label Jun 19, 2024
@clragon
Copy link
Collaborator

clragon commented Jun 19, 2024

When _pagingController has gotten its last page, it will no longer add items and _pagingController2 will load items.
If this is what you want, that is indeed possible.

@aboyo
Copy link
Author

aboyo commented Jun 20, 2024

When _pagingController has gotten its last page, it will no longer add items and _pagingController2 will load items. If this is what you want, that is indeed possible.

Hi,
But when I do this, both _pagingController and _pagingController2's PageRequestListener() will be triggered at the same time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Support request
Projects
None yet
Development

No branches or pull requests

2 participants