简体   繁体   English

如何在 FLUTTER 应用程序中创建兴趣列表

[英]How to create list of interest in FLUTTER app

what I'm trying to do is to have something like this by building an app in Flutter:我想要做的是通过在 Flutter 中构建一个应用程序来获得类似的东西: 在此处输入图像描述

I Have a list of interest and I want to have this kind of card (autosized based on numbers of character) for each of those, I have no fixed number of columns and each row is filled by the right number of elements based on the number of character and I have all the rows needed in order to print all interest in List.我有一个感兴趣的列表,我想为每一个都拥有这种卡片(根据字符数自动调整大小),我没有固定数量的列,每行都根据数量由正确数量的元素填充的字符,我有所有需要的行来打印列表中的所有兴趣。

Which is the right widget that I have to use?我必须使用哪个正确的小部件?

I tried with listview but I have only one element for row, I can use multiple columns but this means I have a fixed number of columns.我尝试使用 listview,但我只有一个行元素,我可以使用多列,但这意味着我有固定数量的列。 I tried also with GridView, but again I have to fix the crossAxisCount (to fix number of columns).我也尝试使用 GridView,但我必须再次修复 crossAxisCount(以修复列数)。

I have no idea,我不知道,

TY

You should use wrap for your need.您应该根据需要使用wrap

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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