所以我一直在尝试在我的应用程序中使用ListWheelScroolView,但我注意到我的小部件CustomButton中的手势检测器无法正常工作,控制台对此错误一无所知,我认为这是因为ListWheel与GestureDetector有一些冲突,请问有人解决此问题的方法吗?
ListWheelScrollView.useDelegate(
diameterRatio: 2,
itemExtent: 140,
perspective: 0.01,
squeeze: 1.15,
physics: FixedExtentScrollPhysics(),
childDelegate: ListWheelChildLoopingListDelegate(
children: <Widget>[
ButtonGroup(
CustomButton("English", "small", "en-US"),
CustomButton("German", "small", "de-DE"),
CustomButton("Danish", "small", "DA"),
CustomButton("Arabic", "small", "ar-EG"),
),])
。
class ButtonGroup extends StatefulWidget {
CustomButton button1, button2, button3, button4;
ButtonGroup(this.button1, this.button2, this.button3, this.button4);
@override
_ButtonGroupState createState() => _ButtonGroupState();
}
class _ButtonGroupState extends State<ButtonGroup> {
@override
Widget build(BuildContext context) {
return Container(
child: Column(
children: <Widget>[
Row(
children: <Widget>[
widget.button1,
widget.button2,
],
),
Row(
children: <Widget>[
widget.button3,
widget.button4,
],
),
],
),
);
}
}
'''