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

Hide Separator if only one group #199

Open
wilpar opened this issue Jan 5, 2024 · 1 comment
Open

Hide Separator if only one group #199

wilpar opened this issue Jan 5, 2024 · 1 comment

Comments

@wilpar
Copy link

wilpar commented Jan 5, 2024

Is your feature request related to a problem? Please describe.
I run into cases where there may or not be multiple groups in a stream. In this case, I would like to NOT put a header (groupSeparatorBuilder) on the single group, as it's redundant.

Describe the solution you'd like
Perhaps a boolean hideSingleGroupSeparator, which if set to true, would ignore the groupSeparatorBuilder completely in cases where there was only one group.

@iksivee
Copy link

iksivee commented Apr 12, 2024

Hello,
you can do omething like this:

groupHeaderBuilder: (element) { return listElements.last != element ? groupDivider() : SizedBox.shrink(); }

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