libraryFragment property

  1. @override
LibraryFragment get libraryFragment
inherited

The library fragment that contains this fragment.

This will be the fragment itself if it is a library fragment.

Implementation

@override
LibraryFragment get libraryFragment =>
    thisOrAncestorOfType<CompilationUnitElement>() as LibraryFragment;