isSyntheticEnumField property

bool get isSyntheticEnumField
inherited

Return true if this element is a synthetic enum field.

It is synthetic because it is not written explicitly in code, but it is different from other synthetic fields, because its getter is also synthetic.

Such fields are index, _name, and values.

Implementation

bool get isSyntheticEnumField {
  return enclosingElement3 is EnumElementImpl &&
      isSynthetic &&
      getter?.isSynthetic == true &&
      setter == null;
}