PackageGraph class final

A parsed .dart_tool/package_graph.json dependency graph.

Edges can be traversed forwards via PgPackage.dependencies / PgPackage.devDependencies and backwards via PgPackage.references / PgPackage.devReferences. The graph may contain cycles.

Constructors

PackageGraph({required List<PgPackage> roots})

Properties

hashCode int
The hash code for this object.
no setterinherited
roots List<PgPackage>
Workspace root packages, in the order listed in the file.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

allPackageNames([bool includeDevDependencies = false]) Set<String>
Returns the names of all packages.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
unreachablePackages(Iterable<String> packageNames) → (Set<String>, Set<String>)
Returns package names in this graph that are not reachable as regular dependencies from packageNames, and package names that remain reachable but change from a direct root dependency to a transitive-only dependency of packageNames.

Operators

operator ==(Object other) bool
The equality operator.
inherited