I am doing an auto-scroll vertically and during the scroll I want I apply an Ontap action, as you see in the example I cannot log the print action:
ps: I have tried that solution but it is not what I am looking for 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()
}
)
)
Thanks,