pathGetResolvedPackagePath function

Future<String?> pathGetResolvedPackagePath(
  1. String path,
  2. String package, {
  3. bool? windows,
})

Shortcut to get a dependency, not officient as it reads multiple times the package_config.json file.

Get a dependency path, you can get the project dir through its parent null if not found

Implementation

Future<String?> pathGetResolvedPackagePath(
  String path,
  String package, {
  bool? windows,
}) async {
  var packageConfigMap = await pathGetPackageConfigMap(path);
  return pathPackageConfigMapGetPackagePath(
    path,
    packageConfigMap,
    package,
    windows: windows,
  );
}