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

Dynamically add sticky header to a sliverList by group? #53

Closed
fenchai23 opened this issue Aug 27, 2020 · 1 comment
Closed

Dynamically add sticky header to a sliverList by group? #53

fenchai23 opened this issue Aug 27, 2020 · 1 comment

Comments

@fenchai23
Copy link

I already have a SliverList like this

SliverFixedExtentList(
                  itemExtent: 90.0,
                  delegate: SliverChildBuilderDelegate((context, index) {
                    final bool _isMedidas = CatalogItems.medidaGroups
                        .contains(itemsCatalogDisplay[index].group);
                    return AnimationConfiguration.staggeredList(
                      position: index,
                      duration: const Duration(milliseconds: 375),
                      child: SlideAnimation(
                        verticalOffset: 50.0,
                        child: FadeInAnimation(
                          child: Padding(
                            padding: const EdgeInsets.symmetric(
                                horizontal: 5.0, vertical: 5.0),
                            child: CatalogCard(
                              itemsCatalogDisplayIndexed:
                                  itemsCatalogDisplay[index],
                              catalogSearchQuery: catalogSearchQuery,
                              itemType: _isMedidas ? 'medidas' : 'normal',
                            ),
                          ),
                        ),
                      ),
                    );
                  }, childCount: itemsCatalogDisplay.length),
                )

How do I add sticker headers by group with itemsCatalogDisplay[index].group ?

@letsar
Copy link
Owner

letsar commented Jul 13, 2022

For each group you create a SliverStickyHeader, I don't really understand what is the issue here. Maybe ask on StackOverflow if it doesn't help you.

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

No branches or pull requests

2 participants