Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/renefloor/side_header_list_view
Listview with sticky headers like the Android contact page
https://github.com/renefloor/side_header_list_view
Last synced: 2 days ago
JSON representation
Listview with sticky headers like the Android contact page
- Host: GitHub
- URL: https://github.com/renefloor/side_header_list_view
- Owner: renefloor
- License: bsd-3-clause
- Created: 2017-12-09T14:33:16.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2021-03-12T08:51:25.000Z (almost 4 years ago)
- Last Synced: 2025-01-02T17:15:55.004Z (9 days ago)
- Language: Dart
- Size: 3.87 MB
- Stars: 209
- Watchers: 6
- Forks: 25
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-flutter - Side Header List - Listview with sticky headers by [Rene Floor](https://github.com/renefloor). (Components / UI)
README
# side_header_list_view
[![pub package](https://img.shields.io/pub/v/side_header_list_view.svg)](https://pub.dartlang.org/packages/side_header_list_view)
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/renefloor)Listview with sticky headers like the Android contact page
![alt text](https://raw.githubusercontent.com/renefloor/side_header_list_view/master/example.gif "Example for SideHeaderListView")
## Usage
````
new SideHeaderListView(
// Set how many items the list has
itemCount: items.length,
// Set the height of the item widgets. For now this has to be a fixed height
itemExtend: 150.0,
// Set the header builder, this needs to return the widget for the side header
headerBuilder: (BuildContext context, int index){
return new HeaderWidget(items[index].startDate);
},
// Set the item builder, this is everything in the row without the header
itemBuilder: (BuildContext context, int index){
return new ListItem(items[index]);
},
// HasSameHeader will be used to know whether the header has to be shown for a position
hasSameHeader: (int a, int b){
return items[a].day == items[b].day;
},
);
````