简体   繁体   中英

Flutter Custom Widget for ListView

How to make this type of ListView in flutter?

在此处输入图片说明

You can create a custom stateful listViewItem widget and build the listview using ListViewBuilder.

Widget build(BuildContext context) {
   return YourWidget();
}

In your listview:

Widget buildListView() {
  ListView.builder(
    controller: _controller,
    itemCount: _itemCount,
    itemBuilder: (BuildContext context, int index) {
      return YourWidget(item: items[index]);
  }
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM