PubspecResolver class
Utility class for parsing and resolving pubspec.yaml information
Constructors
- PubspecResolver(String _pubspecPath)
- PubspecResolver.current()
-
Creates a resolver for the current working directory
factory
- PubspecResolver.fromDirectory(String directoryPath)
-
Creates a resolver for the pubspec.yaml in the given directory
factory
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
-
getDependencies(
) → Map< String, dynamic> ? - Gets dependencies from pubspec.yaml
-
getDescription(
) → String? - Gets the package description from pubspec.yaml
-
getDevDependencies(
) → Map< String, dynamic> ? - Gets dev dependencies from pubspec.yaml
-
getFlutterAssets(
) → List< String> ? - Gets flutter assets configuration from pubspec.yaml
-
getPackageName(
) → String - Gets the package name from pubspec.yaml Throws StateError if not loaded or package name not found
-
getRawContent(
) → Map< String, dynamic> ? - Gets the raw pubspec content as a map
-
getVersion(
) → String? - Gets the package version from pubspec.yaml
-
isFlutterProject(
) → bool - Checks if the project is a Flutter project
-
load(
) → Future< void> - Loads and parses the pubspec.yaml file
-
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