hasField method
Implementation
bool hasField(TypeDefinition otherField) {
  return fields.keys.firstWhereOrNull((k) => fields[k] == otherField) != null;
}bool hasField(TypeDefinition otherField) {
  return fields.keys.firstWhereOrNull((k) => fields[k] == otherField) != null;
}