Pubspec class

A singleton class that reads and caches the content of pubspec.yaml in current directory and provides utilities for .

Constructors

Pubspec({String? currentDirPath})

Properties

filePath String
File path of pubspec.yaml in current directory.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getContent() Future<JsonMap>
Loads the content of pubspec.yaml in current directory, this methods must be called before any other method.
getInfo() Future<Info>
Returns basic information about the package defined in pubspec.yaml.
getScripts() Future<JsonMap>
Returns a map of scripts defined in pubspec.yaml or the scripts from the file path defined in pubspec.yaml.
getSource() Future<String>
Returns the file path where the scripts are defined which can be either pubspec.yaml or a file path defined in pubspec.yaml.
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