getPackageNameFromLibrary function

String? getPackageNameFromLibrary(
  1. LibraryElement library
)

Implementation

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