fluttercommunity / fluttercommunity/flutter_sticky_headers

Sparse header setup not working currently

Open
#9 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
1.2k
Forks
130
PR merge metrics
No merged PRs in 30d

Description

Given code like this:

``` dart
ListView.builder(
itemCount: 35,
itemBuilder: (context, i) {
final tile = ListTile(title: Text("My Tile"));

if (i % 5 == 0) {
return StickyHeader(
content: tile,
header: Container(
padding: EdgeInsets.symmetric(
horizontal: 16.0,
vertical: 8.0,
),
alignment: Alignment.centerLeft,
decoration: BoxDecoration(color: Colors.lightGreen),
child: Text("Section"),
),
);
}

return tile;
}
);
```

Then I would expect the header stay on top of the list until the next *header* replaces it. Currently, it will only stay for as long as the current *item* stays on screen.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.