【发布时间】:2020-12-11 19:00:24
【问题描述】:
我正在垂直自动滚动,并且在滚动期间我想要应用 Ontap 操作,正如您在示例中看到的那样,我无法记录打印操作:
ps:我已经尝试过该解决方案,但这不是我想要的HERE
@override
void initState() {
super.initState();
Future.delayed(Duration(milliseconds: 100)).then((value) {
if (_scrollController.hasClients)
_scrollController.animateTo(100,
duration: Duration(seconds: 5), curve: Curves.ease);
});
}
SingleChildScrollView(
controller: _scrollController,
scrollDirection: Axis.vertical,
physics: NeverScrollableScrollPhysics(),
child: GestureDetector(
onTap: () {
print('clicked');
},
child: Container()
}
)
)
谢谢,
【问题讨论】: