getPackageNameFromLibrary function
Implementation
String? getPackageNameFromLibrary(LibraryElement library) {
String? packageName;
packageName = _getPackageNameFromPackageUri(library.identifier);
packageName ??= _getPackageNameFromFilePath(library.identifier);
return packageName;
}