packageRoot method

Uri packageRoot(
  1. String packageName
)

The root of package:$packageName.

$packageName/.

This folder is owned by pub, and should never be written to.

Implementation

Uri packageRoot(String packageName) {
  final package = packageConfig[packageName];
  if (package == null) {
    throw StateError('Package $packageName not found in packageConfig.');
  }
  return package.root;
}