如何在Flutter(Scroll Widget)中实现滚动控制器? [英] How to implement Scroll Controller in Flutter (Scroll Widget)?
问题描述
我正在尝试在Flutter中实现Scroll Widget,但无法实现.我看到了许多教程,但是他们已经使用ListView或Grid View实现了滚动小部件.就我而言,我有多个文本输入和按钮的注册页面.在这种情况下,我的页面没有向下滚动,请帮助某人.
I am trying to implement a Scroll Widget in Flutter but not able to implement it. I saw many tutorials but they have implemented scroll widget with ListView or Grid View. In my case, I have Register page with multiple Text Inputs and Buttons. In this case, my page is not scrolling down please help someone.
div{
Scroll Widget on the Register page.
}
推荐答案
您可以使用 SingleChildScrollView
并将滚动内容作为其子级提供有关更多信息,请参见文档
You can use SingleChildScrollView
and provide scrolling contents as its child
for more you can find on the documentation
https://api.flutter.dev/flutter/widgets/SingleChildScrollView-class.html
例如:
SingleChildScrollView(
// scrollable contents as child
child:Column(...)
)
这篇关于如何在Flutter(Scroll Widget)中实现滚动控制器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!