Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/dart/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Dart 颤振按钮不显示轻敲动画/涟漪效果_Dart_Flutter - Fatal编程技术网

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),
                        );