【发布时间】:2021-11-10 20:12:52
【问题描述】:
我有以下代码:
ListView.builder(
padding: EdgeInsets.zero,
physics: globalScrollPhysics,
scrollDirection: Axis.horizontal,
itemCount: this.results.length,
itemBuilder: (context, index) {
return SearchResultCard(
foodData: this.results[index],
constraints: this.constraints,
index: index);
},
),
globalScrollPhysics 就是 AlwaysScrollableScrollPhysics。我面临的问题是我似乎无法拖动列表视图来用鼠标滚动。我可以使用触控板并用两根手指滚动,但是当我使用鼠标时,我无法拖动它。是什么导致了这个问题?小部件位于堆栈的顶部,因此上面没有任何内容。
【问题讨论】: