I have a list with over 5000 models and need to display them in a Wrap. But the widget Wrap creates all the elements at once and this has a very bad effect on performance is there any way to display them as a ListView.builder
my code:
final list = [];
Wrap(
runSpacing: 12,
spacing: 12,
children: List.generate(
list.length,
(index) => CustomChip(List[index]),
),
),
this is what I want to get
https://i.pinimg.com/originals/6e/dc/db/6edcdbadfe6230efef35abc93bd689ab.png
You can use Gridview.builder or Add use Pagination, when t=you reached the maximum scroll then load another data and add into the list which you have used Wrap.
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.