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.