load method

Package load(
  1. PackageId id
)

Loads the package identified by id.

Throws an ArgumentError if id has an invalid source.

Implementation

Package load(PackageId id) {
  return Package.load(
    getDirectory(id),
    loadPubspec: Pubspec.loadRootWithSources(sources),
    expectedName: id.name,
  );
}