Pubspec class

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

Constructors

Pubspec()

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

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

Static Properties

content JsonMap?
Text content of pubspec.yaml once it has been read, used as a mean of memoization.
getter/setter pair
filePath String
File path of pubspec.yaml in current directory.
final
scripts JsonMap?
A map of scripts defined in pubspec.yaml, used as a mean of memoization.
getter/setter pair
source String?
The file path where the scripts are defined, used as a mean of memoization.
getter/setter pair