sticky_grouped_list icon indicating copy to clipboard operation
sticky_grouped_list copied to clipboard

How to disable floating Header

Open insinfo opened this issue 3 years ago • 6 comments

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

insinfo avatar Dec 14 '21 22:12 insinfo

Did you solve it?

ilkinaslanli2001 avatar Apr 01 '22 13:04 ilkinaslanli2001

waiting for this issue too

rezashamdani avatar Apr 21 '22 06:04 rezashamdani

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

rezashamdani avatar Apr 21 '22 06:04 rezashamdani

@rezashamdani what do you mean by "remark"?

waqadArshad avatar Jun 23 '22 20:06 waqadArshad

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

SilenceCodder avatar Jul 12 '23 14:07 SilenceCodder

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.

th8m0z avatar Feb 05 '24 13:02 th8m0z