PubspecInfo class

The result of parsing a pubspec.yaml file.

Holds the resolved versions for both regular and dev dependencies as read from the accompanying pubspec.lock. When no lock file exists, versions are approximated from the version constraint strings in pubspec.yaml.

Constructors

PubspecInfo({required String name, required Map<String, Version> dependencies, required Map<String, Version> devDependencies, required VersionConstraint? sdkConstraint, required String path})
Creates a PubspecInfo.
const

Properties

all Map<String, Version>
Combined map of dependencies and devDependencies.
no setter
dependencies Map<String, Version>
Resolved versions for dependencies, keyed by package name.
final
devDependencies Map<String, Version>
Resolved versions for dev_dependencies, keyed by package name.
final
hashCode int
The hash code for this object.
no setterinherited
name String
The package name declared in pubspec.yaml.
final
path String
Absolute or relative path to the pubspec.yaml file that was parsed.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sdkConstraint → VersionConstraint?
The environment.sdk constraint, if declared.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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