Dart 颤振按钮不显示轻敲动画/涟漪效果
我有以下代码:Dart 颤振按钮不显示轻敲动画/涟漪效果,dart,flutter,Dart,Flutter,我有以下代码: return new ListTile( leading: new CircleAvatar( backgroundColor: Colors.blue, child: new Image.network( "http://res.cloudi
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按钮在点击时并没有任何涟漪效应
有什么想法吗?我想你需要用
材料来包装,看看涟漪效应。试着把onPressed参数改成({}
?@JeromeEscalante这才是真正的问题!谢谢似乎当onPressed方法为null
时-默认情况下按钮处于禁用状态。
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),
);