Flutter:GestureDetector does not work in ListWheelScrollView

Viewed 465

I don't find the error why the on tab gesture is not called when you press one of the tiles. Can someone help me? What am I doing wrong?

Widget build(BuildContext context) {
final List<Widget> questionThemes = <Widget>[];

for (int i = 0; i < numberQuestionBundels; i++) {
  questionThemes.add(GestureDetector(
    onTap: () {
      setState(() {
        print('Does not work');
        //... Navigation Method
      });
    },
    child: Container(
      alignment: Alignment.centerLeft,
      margin: const EdgeInsets.all(2.0),
      child: ListView(itemExtent: 20.0, children: <Widget>[
        Text('Thema: ' + lectionBundle.taskBundle[i].nameOfTask,
            style: textStyles.lightGrey20Creepy,
            textAlign: TextAlign.center),
        //... more Texts
      ]),
    ),
  ));
}

return ListWheelScrollView(
  itemExtent: 110,
  diameterRatio: 5,
  children: questionThemes,
);}
0 Answers
Related