isWidget static method

bool isWidget(
  1. ClassDeclaration node
)

Returns true if the class is a StatelessWidget or StatefulWidget.

Implementation

static bool isWidget(ClassDeclaration node) {
  return detect(node) != WidgetType.none;
}