Workspace class final

The packages dpk works with, found from a starting directory.

Constructors

Workspace({required WorkspacePackage root, required List<WorkspacePackage> packages, required WorkspacePackage current})
const

Properties

allPackages → List<WorkspacePackage>
The workspace root followed by every workspace package.
no setter
current → WorkspacePackage
The package that contains the starting directory.
final
hashCode → int
The hash code for this object.
no setterinherited
isWorkspace → bool
no setter
packages → List<WorkspacePackage>
The workspace packages, in the order of the root pubspec's workspace list. Empty for a standalone package.
final
root → WorkspacePackage
The workspace root package. For a standalone package, the package itself.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
packageNamed(String name) → WorkspacePackage?
The workspace package or root with the given name.
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

discover(String start) → Workspace?
Finds the workspace that contains start.
expandPattern(String pattern, String root) → List<String>
Directories under root that pattern matches, as canonical paths sorted by path. A pattern without glob characters matches that directory if it exists. Glob matches inside hidden directories, build, and pub_packages are skipped.
workspaceMemberPaths(String directory) → List<String>?
The absolute member directories that the pubspec.yaml in directory lists under workspace, plus the directories its dpk.yaml workspace globs match. Returns null when neither file declares a workspace.