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

How to disable floating Header #38

Open
insinfo opened this issue Dec 14, 2021 · 6 comments
Open

How to disable floating Header #38

insinfo opened this issue Dec 14, 2021 · 6 comments

Comments

@insinfo
Copy link

insinfo commented Dec 14, 2021

I put floatingHeader: false but it still keeps displaying floating header

StickyGroupedListView<Agenda, DateTime>(
                elements: _elements,
                order: StickyGroupedListOrder.DESC, // optional
                //stickyHeaderBackgroundColor: Colors.transparent,
                groupBy: (Agenda element) {
                  return DateTime(
                      element.data.year, element.data.month, element.data.day);
                },
                groupComparator: (DateTime value1, DateTime value2) =>
                    value2.compareTo(value1),
                itemComparator: (Agenda element1, Agenda element2) =>
                    element1.data.compareTo(element2.data),
                floatingHeader: false,
                groupSeparatorBuilder: (Agenda element) => Container(
                  height: 50,
                  child: Align(
                    alignment: Alignment.center,
                    child: Container(
                      width: 120,
                      decoration: BoxDecoration(
                        color: Colors.blue[300],
                        border: Border.all(
                          color: Colors.blue[300],
                        ),
                        borderRadius: BorderRadius.all(Radius.circular(20.0)),
                      ),
                      child: Padding(
                        padding: EdgeInsets.all(8.0),
                        child: Text(
                          '${element.week}',
                          style: TextStyle(color: Colors.white),
                          textAlign: TextAlign.center,
                        ),
                      ),
                    ),
                  ),
                ),

                itemBuilder: (context, Agenda element) => listItem(element),
              ),

image

@ilkinaslanli2001
Copy link

Did you solve it?

@rezashamdani
Copy link

waiting for this issue too

@rezashamdani
Copy link

for quick fixes: remark the function at line 329 to 338

@waqadArshad
Copy link

@rezashamdani what do you mean by "remark"?

@SilenceCodder
Copy link

SilenceCodder commented Jul 12, 2023

The author should please fix this floating header issue.

This package is Good but only issue is not been able to TURN OFF floating header.

If it's not yet fixed, Any new comer should use this alternative package

grouped_list: ^5.1.2

@th8m0z
Copy link

th8m0z commented Feb 5, 2024

I have created a fork where I added an additional parameter to disable the floating header. Currently this also removes the first normal header, but if you want I can also fix this.

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

6 participants