使用带装饰的容器时长按InkResponse不起作用
https://github.com/flutter/flutter/issues/13421
return new Container(
color: Colors.white,
padding: new EdgeInsets.all(16.0),
child: new Column(
要么
return new Container(
decoration: new BoxDecoration(
color: Colors.white,
),
padding: new EdgeInsets.all(16.0),
child: new Column(
(两者都相同)
如果我评论颜色,一切都恢复正常 .
image 属性也是如此 .
But not 为 border 属性 .
我在 Container 上放置 GestureDetector 以查看是否检测到手势,检测没有问题,只是 long press 动画无法正常工作 .
我也可以使用GestureDetector确认这个 without ,我可以在做 long press 或 tap 时从模拟器中听到 Tapping Sound .
Temporary Workaround 是用 Scaffold
return new Scaffold(
backgroundColor: Colors.white,
body: new Container(
padding: new EdgeInsets.all(16.0),
child: new Column(
1 回答
这就是文档所说的:
所以我在Container中添加了一个Material ancestor .