enclosingElement3 property

  1. @Deprecated('Use Element2.enclosingElement2 instead or ' 'Fragment.enclosingFragment instead')
Element? get enclosingElement3

The element that either physically or logically encloses this element.

For LibraryElement returns null, because libraries are the top-level elements in the model.

For CompilationUnitElement returns the CompilationUnitElement that uses part directive to include this element, or null if this element is the defining unit of the library.

Implementation

@Deprecated('Use Element2.enclosingElement2 instead or '
    'Fragment.enclosingFragment instead')
Element? get enclosingElement3;