supertype property

InterfaceType? supertype

Return the superclass of this element.

For ClassElement returns null only if this class is Object. If the superclass is not explicitly specified, or the superclass cannot be resolved, then the implicit superclass Object is returned.

For EnumElement returns Enum from dart:core.

For MixinElement always returns null.

Note: Because the element model represents the state of the code, it is possible for it to be semantically invalid. In particular, it is not safe to assume that the inheritance structure of a class does not contain a cycle. Clients that traverse the inheritance structure must explicitly guard against infinite loops.

Implementation

InterfaceType? get supertype;