Flutter - Container onPressed?

后端 未结 6 1653
孤街浪徒
孤街浪徒 2021-01-30 20:01

I have this container:

  new Container(
    width: 500.0,
    padding: new EdgeInsets.fromLTRB(20.0, 40.0, 20.0, 40.0),
    color: Colors.green,
    child: new C         


        
6条回答
  •  一生所求
    2021-01-30 20:17

    The simplest solution is to wrap the Container in a GestureRecognizer, but consider using an InkWell or FlatButton if you are building a Material design app. These widgets will show a visual splash response when touched.

提交回复
热议问题