Entrypoint.global constructor

Entrypoint.global(
  1. Package package,
  2. LockFile? _lockFile,
  3. SystemCache cache, {
  4. SolveResult? solveResult,
})

Creates an entrypoint given package and lockfile objects. If a SolveResult is already created it can be passed as an optimization.

Implementation

Entrypoint.global(
  Package package,
  this._lockFile,
  this.cache, {
  SolveResult? solveResult,
})  : _packages = (root: package, work: package),
      workingDir = package.dir,
      isCachedGlobal = true {
  if (solveResult != null) {
    _packageGraph =
        Future.value(PackageGraph.fromSolveResult(this, solveResult));
  }
}