libraryFragment property
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;