點擊容器會觸發onTap處理程序,但不會顯示任何墨水飛濺效果。InkWell不會顯示連鎖效應
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return new Scaffold(
appBar: new AppBar(
title: new Text(widget.title),
),
body: new Center(
child: new InkWell(
onTap:(){print("tapped");},
child: new Container(
width: 100.0,
height: 100.0,
color: Colors.orange,
),
),
),
);
}
}
我試着將InkWell放入容器中,但也是徒勞。