我有这个容器:
new Container(
width: 500.0,
padding: new EdgeInsets.fromLTRB(20.0, 40.0, 20.0, 40.0),
color: Colors.green,
child: new Column(
children: [
new Text("Ableitungen"),
]
),
),
当用户点击Container
时,我希望触发一个onPressed()
方法(就像可以使用IconButton
一样)。我如何在Container
中实现此行为?