PubSpec class
Used to read a pubspec.yaml file
Constructors
- PubSpec.fromFile(String path)
-
Reads a pubspec.yaml located at
path
- PubSpec.fromScript(DartScript script)
-
Reads a pubspec.yaml from the path that
script
is located in. - PubSpec.fromString(String yamlString)
-
parses a pubspec from a yaml string.
factory
Properties
-
dependencies
↔ Map<
String, Dependency> -
Returns an unmodifiable map of the dependencies
If you need to update the map pass a new map
with the updated values.
getter/setter pair
-
dependencyOverrides
↔ Map<
String, Dependency> -
Returns an unmodifiable map of the dependency overrides
If you need to update the map pass a new map
with the updated values.
getter/setter pair
-
executables
→ List<
Executable> -
Get the list of exectuables
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- name ↔ String?
-
Returns the name field from the pubspec.yaml
getter/setter pair
- pubspec ↔ PubSpec
-
the wrapped pubspec.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- version ↔ Version?
-
Returns the version field from the pubspec.yaml
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
saveToFile(
String path) → void -
Saves this PubSpec to a pubspec.yaml at the given
path
. Thepath
must be a directory not a file name. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited