📜  颤动如何在容器上添加 ontap - 任何代码示例

📅  最后修改于: 2022-03-11 14:56:43.745000             🧑  作者: Mango

代码示例1
You can wrap your Container in an InkWell or GestureDetector.
The difference is that InkWell is a material widget that shows
a visual indication that the touch was received,
whereas GestureDetector is a more general purpose widget that shows no visual
indicator.

GestureDetector(
    onTap: () { 
        print("Click event on Container"); 
    },
    child: Container(.......),
)