classForType method

ClassElement? classForType(
  1. DartType t
)

Look up the class info object, ignoring the nullability of t

Implementation

ClassElement? classForType(DartType t) {
  final baseType = element.typeSystem.promoteToNonNull(t);
  return classes.firstWhereOrNull((v) => v.thisType == baseType);
}