我没有找到错误,为什么当您按下其中一个图块时未调用选项卡上的手势。有人能帮我吗?我在做什么错了?
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,
);}