fluttercommunity / fluttercommunity/flutter_sticky_headers
Sparse header setup not working currently
- 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.