isClickableWidget static method

bool isClickableWidget(
  1. Widget widget
)

检查是否为可点击的Widget

Implementation

static bool isClickableWidget(Widget widget) {
  return widget is ElevatedButton ||
      widget is TextButton ||
      widget is OutlinedButton ||
      widget is IconButton ||
      widget is FloatingActionButton ||
      widget is InkWell ||
      widget is GestureDetector ||
      widget is MaterialButton;
}