[英]How to add Two listview in one listview into the pageview builder flutter
我在列表视图中使用了两个列表视图,当我将整体列表视图放在页面视图中时,页面视图不可滚动
Instead of using Listviews inside each other, I suggest you to use a GridView
.我建议您使用
GridView
,而不是在彼此内部使用 Listviews 。 I think your ListView
s have different directions.我认为您的
ListView
有不同的方向。 If they do, GridView
s will help you.如果他们这样做,
GridView
会帮助你。
Other solution, if you insist on using ListView
, then wrap the ListView
s with ConstrainedBox
then give them BoxConstraints
其他解决方案,如果您坚持使用
ListView
,则用ConstrainedBox
包装ListView
,然后给它们BoxConstraints
ConstrainedBox(
constraints: BoxConstraints(maxHeight: 100, maxWidth: 200)
child: ListView(),
)
You should adjust maxHeight
and maxWidth
in the proper size.您应该将
maxHeight
和maxWidth
调整为适当的大小。
Hope this helps.希望这可以帮助。
it looks like you are looking for sliverlist看起来你正在寻找 sliverlist
SliverList & SliverGrid SliverList 和 SliverGrid
or sliver tool或条子工具
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.