canHaveGenerics static method

bool canHaveGenerics(
  1. DartType type
)

Implementation

static bool canHaveGenerics(DartType type) {
  final element = type.element;
  if (element is ClassElement) {
    return element.typeParameters.isNotEmpty;
  }
  return false;
}