PackageConfigFileBuilder class

Helper for building .dart_tool/package_config.json files.

See accepted/future-releases/language-versioning/package-config-file-v2.md in https://github.com/dart-lang/language/.

Use the add method to add package configurations. These configurations will accumulate into one package config file with the toContent method.

Constructors

PackageConfigFileBuilder()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

add({required String name, required Folder rootFolder, String packageUriStr = 'lib/', String? languageVersion}) → void
Adds a package configuration.
copy() → PackageConfigFileBuilder
Copies this PackageConfigFileBuilder into a new instance.
hasPackage(String name) → bool
Whether a package with name has already been added.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toContent() → String
Returns the contents of the built package config file.
toString() → String
A string representation of this object.
inherited

Operators

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