typeName property

String typeName

Returns the type name.

Implementation

String get typeName {
  if (isFutureOr) {
    return 'FutureOr';
  }

  var typeStr = type.toString();
  var idx = typeStr.indexOf('<');
  if (idx > 0) typeStr = typeStr.substring(0, idx);
  return typeStr;
}