更新时间:2021-10-22 22:41:52
Flutter在属性上使用合成. 将所需的小部件包装为可点击的小部件,以实现所需的功能.
Flutter use composition over properties. Wrap the desired widget into a clickable one to achieve what you need.
一些可点击的小部件: GestureDetector
, InkWell
,
Some clickable widgets : GestureDetector
, InkWell
, InkResponse
.
new GestureDetector(
onTap: ()=> ......,
child: new Card(...),
);