Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/itsJoKr/sticky_header_list
[DEPRECATED] Sticky Headers List for Flutter
https://github.com/itsJoKr/sticky_header_list
dart flutter
Last synced: 3 months ago
JSON representation
[DEPRECATED] Sticky Headers List for Flutter
- Host: GitHub
- URL: https://github.com/itsJoKr/sticky_header_list
- Owner: itsJoKr
- License: mit
- Created: 2018-05-01T15:30:07.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-23T15:35:38.000Z (almost 5 years ago)
- Last Synced: 2024-07-07T06:47:02.731Z (4 months ago)
- Topics: dart, flutter
- Language: Dart
- Homepage:
- Size: 18.6 KB
- Stars: 98
- Watchers: 5
- Forks: 9
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-flutter - Sticky Header List
README
# sticky_header_list
Sticky Header list for Flutter.**DEPRECATED:** There was no sticky library when I created this. Hope it helped someone, but now there are better solutions out there, so please check them at pub.dev
https://pub.dev/packages/sticky_headers
https://pub.dev/packages/flutter_sticky_header![](https://i.imgur.com/8M4nMcO.gif)
## Usage
You need to wrap your widgets with `StickyListRow`. Use `HeaderRow` for headers that sticks
and `RegularRow` for regular rows that scroll normally.Height is optional, but if you include it, it will avoid usage of GlobalKeys to determine height:
`new StickyRow(child: yourWidget, height: 20.0)`
Usage is similar to ListView. You can either supply list:
new StickyList(
children: [
new HeaderRow(child: yourWidget),
new RegularRow(child: yourWidget),
new RegularRow(child: yourWidget),
new HeaderRow(child: yourWidget),
new RegularRow(child: yourWidget),
/...
],
);
Or you can use builder:new StickyList.builder(
builder: (BuildContext context, int index) {
if (something)
return new HeaderRow(yourWidget)
else
return new RegularRow(yourWidget)
},
itemCount: 20,
);