typeDisplayName function

String typeDisplayName(
  1. DartType type
)

Display string with the nullability suffix stripped.

Implementation

String typeDisplayName(DartType type) {
  final full = type.getDisplayString();
  return full.endsWith('?') ? full.substring(0, full.length - 1) : full;
}