Dimibe/sticky_grouped_list

How to disable floating Header

insinfo opened this issue · 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

Did you solve it?

waiting for this issue too

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

@rezashamdani what do you mean by "remark"?

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

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.