PubInteraction class abstract
helper class for interactions with pub
Constructors
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
-
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
- pubCacheDir → String
-
gets the pub cache directory
no setter
Static Methods
-
getAllPackageVersionsForPackageInCache(
String packageName) → Map< Version, String> -
getLatestVersionInCacheFor(
String packageName) → Version -
getPackagePathInCache(
String packageName, String? version) → String -
returns the cache path of a package with the given
packageName
andversion
ifversion
is null the latest version is used -
installPackageToCache(
String packageName, String? version, {StdoutSession? stdoutSession}) → Future< String> -
installs a package to the pub cache and returns the path to it throws RunDartError on failure
if no
version
is provided dart will decide what version to use ("the best of all known versions") -
removePackageFromCache(
String packageName, String version) → Future< bool> -
runPubGet(
String packageDirectory, {StdoutSession? stdoutSession, bool forceUseFlutterTool = false}) → Future -
runs pub get in the given
packageDirectory
depending or the package eitherdart
orflutter
is executed