flutter_nested

pub package PRs Welcome flutter_nested release

Lists that support nested scrolling can customize the header and the number of lines displayed per line.

Content

Examples

flutter_nested

Getting Started

  _buildList() {
    return HiNestedScrollView(
        controller: scrollController,
        padding: EdgeInsets.only(top: 10, left: 10, right: 10),
        headers: [
          Image.network(
            "https://img.mukewang.com/5f057a6a0001f4f918720764.jpg",
          ),
          SizedBox(height: 10)
        ],
        gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
            crossAxisCount: 2, childAspectRatio: 0.95),
        itemCount: 50,
        itemBuilder: (BuildContext context, int index) {
          return _buildItem(index);
        });
  }

API

PropsTypeOptionalDescription
headersListtrueDefine the head of the list
itemCountintfalseThe number of items except head
itemBuilderIndexedWidgetBuilderfalseCalled to build children for the sliver
gridDelegateSliverGridDelegatefalseControls the layout of tiles in a grid
controllerScrollControllertrueControls a scrollable widget
paddingEdgeInsetsGeometrytrueThe padding of list

Contribution

Issues are welcome. Please add a screenshot of you bug and a code snippet. Quickest way to solve issue is to reproduce it in one of the examples.

Pull requests are welcome. If you want to change the API or do something big it is best to create an issue and discuss it first.


MIT Licensed

Libraries

flutter_nested