isSyntheticEnumField property

bool 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 enclosingElement is EnumElementImpl &&
      isSynthetic &&
      getter?.isSynthetic == true &&
      setter == null;
}