颤振:ListView禁用触摸屏滚动 [英] Flutter: ListView disable scrolling with touchscreen
本文介绍了颤振:ListView禁用触摸屏滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以让ListView仅可通过ScrollController滚动,而不能通过触摸屏滚动?
Is it possible to let a ListView only be scrollable with the ScrollController and not with the touchscreen?
推荐答案
如评论中所述, NeverScrollableScrollPhysics类将执行以下操作:
As mentioned in the comments, the NeverScrollableScrollPhysics class will do this:
NeverScrollableScrollPhysics类
不允许用户滚动的滚动物理。
Scroll physics that does not allow the user to scroll.
这篇关于颤振:ListView禁用触摸屏滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文