hasClickHandler static method
检查Widget是否有点击处理器
Implementation
static bool hasClickHandler(Widget widget) {
try {
if (widget is GestureDetector) {
return widget.onTap != null || widget.onDoubleTap != null || widget.onLongPress != null;
}
if (widget is InkWell) {
return widget.onTap != null || widget.onDoubleTap != null || widget.onLongPress != null;
}
return false;
} catch (e) {
return false;
}
}