我有以下代码:
return new ListTile(
leading: new CircleAvatar(
backgroundColor: Colors.blue,
child: new Image.network(
"http://res.cloudinary.com/kennyy/image/upload/v1531317427/avatar_z1rc6f.png")),
title: new Row(
children: <Widget>[
new Expanded(child: new Text(message)),
new FlatButton(onPressed: null, child: new Text("Delete"))
]
),
subtitle: new Text(from),
);
在我的ListView中创建了一个图块。
每个磁贴应有一个按钮。
当我点击按钮时-我实际上看不到任何波纹效果或动画。我非常确定它是Material主题的一部分,作为FlatButtons的手势,但是我尝试使用InkWell
找到了解决方案:
return new ListTile(
leading: new CircleAvatar(
backgroundColor: Colors.blue,
child: new Image.network(
"http://res.cloudinary.com/kennyy/image/upload/v1531317427/avatar_z1rc6f.png")),
title: new Row(
children: <Widget>[
new Expanded(child: new Text(message)),
InkWell(
child: FlatButton(onPressed: null, child: new Text("Delete"), color: Colors.amber))
]
),
subtitle: new Text(from),
);
但是仍然-点击时,我的列表视图按钮没有任何波纹效果。
有什么主意吗?