我正在Gridview中制作一个可滑动的横幅,使用
GridView.count(
childAspectRatio: height / width,
scrollDirection: Axis.horizontal,
children: generateList(),
crossAxisCount: 1,
)子大小将占据GridView的整个宽度。但现在我需要让滚动行为变成每页对齐,就像在主屏幕上滚动/滑动手机一样。
有什么方法可以实现这样的行为吗?
发布于 2019-05-10 14:33:26
在评论中使用@pskink状态。PageView确实做到了这一点。
PageView(
scrollDirection: Axis.horizontal,
children: generateList(),
)太糟糕了,他没有回应我的评论,所以我决定把他的答案放在这里,这样它就可以帮助任何有同样问题的人
https://stackoverflow.com/questions/56015479
复制相似问题