printType property

String get printType

Output AbstractType as dart code.

Implementation

String get printType {
  final q = nullable ? "?" : "";

  if (this is ListType) {
    return "List<${(this as ListType).child.printType}>$q";
  }

  if (this is MapType) {
    final map = this as MapType;
    return "Map<${map.key.printType}, ${map.value.printType}>$q";
  }

  return "$className$q";
}