点击容器会触发onTap()处理程序,但不会显示任何墨水飞溅效果.
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,
),
),
),
);
}
}
Run Code Online (Sandbox Code Playgroud)
我试着把InkWell内部放在里面Container但是徒劳无功.