PubPackageMeta class

Default implementation of PackageMeta depends on pub packages.



PubPackageMeta(Folder dir, ResourceProvider resourceProvider)


description → String
read-only, inherited
dir → Folder
final, inherited
hashCode → int
The hash code for this object. [...]
read-only, inherited
homepage → String
read-only, inherited
hostedAt → String
null if not a hosted pub package. If set, the hostname that the package is hosted at -- usually ''.
read-only, inherited
isSdk → bool
Returns true if this represents a 'Dart' SDK. [...]
read-only, inherited
isValid → bool
Returns true if we are a valid package, valid enough to generate docs.
read-only, inherited
name → String
read-only, inherited
needsPubGet → bool
read-only, inherited
pathContext → Context
read-only, inherited
requiresFlutter → bool
read-only, inherited
resolvedDir → String
Returns resolved directory.
read-only, override
resourceProvider → ResourceProvider
final, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited
version → String
read-only, inherited


getChangelogContents() → File
getInvalidReasons() → List<String>
Returns a list of reasons this package is invalid, or an empty list if no reasons found. [...]
getLicenseContents() → File
getReadmeContents() → File
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
runPubGet(String flutterRoot) → void
sdkType(String flutterRootPath) → String
Returns 'Dart' or 'Flutter' (preferentially, 'Flutter' when the answer is "both"), or null if this package is not part of a SDK.
toString() → String
Returns a string representation of this object.


operator ==(Object other) → bool
The equality operator. [...]

Static Methods

fromDir(Folder dir, ResourceProvider resourceProvider) PubPackageMeta
This factory is guaranteed to return the same object for any given dir.absolute.path. Multiple dir.absolute.paths will resolve to the same object if they are part of the same package. Returns null if the directory is not part of a known package.
fromElement(LibraryElement libraryElement, String sdkDir, ResourceProvider resourceProvider) PubPackageMeta
Use this instead of fromDir where possible.
fromFilename(String filename, ResourceProvider resourceProvider) PubPackageMeta
sdkDirParent(Folder dir, ResourceProvider resourceProvider) → Folder
If dir is inside a Dart SDK, returns the directory of the SDK, and null otherwise.