cccicl
cccicl
发布于 6个月前

flutter 常用手势 / 触摸事件监听

GestureDetector(
  onTap: () {
    print("点击");
  },
  onDoubleTap: () {
    print("双击");
  },
  onLongPress: () {
    print("长按");
  },
  child: Container(
    width: 200.0,
    height: 200.0,
    color: Colors.red,
  ),
)