PubPackageMeta class abstract

Default implementation of PackageMeta depends on pub packages.

Inheritance

Constructors

PubPackageMeta(Folder dir, ResourceProvider resourceProvider)

Properties

dir → Folder
finalinherited
hashCode int
The hash code for this object.
no setterinherited
homepage String
no setterinherited
hostedAt String?
The hostname that the package is hosted at, usually 'pub.dev', or null if not a hosted pub package.
no setterinherited
isSdk bool
Whether this represents a 'Dart' SDK.
no setterinherited
isValid bool
Whether this is a valid package (valid enough to generate docs).
no setterinherited
name String
no setterinherited
requiresFlutter bool
no setterinherited
resolvedDir String
latefinal
resourceProvider → ResourceProvider
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
version String
no setterinherited

Methods

getInvalidReasons() List<String>
The list of reasons this package is invalid.
inherited
getReadmeContents() → File?
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sdkType(String? flutterRootPath) String?
Returns 'Dart' or 'Flutter' (preferentially, 'Flutter' when the answer is "both"), or null if this package is not part of an SDK.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

fromDir(Folder folder, ResourceProvider resourceProvider) PackageMeta?
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) PackageMeta?
Use this instead of fromDir where possible.
fromFilename(String filename, ResourceProvider resourceProvider) PackageMeta?
sdkDirParent(Folder folder, ResourceProvider resourceProvider) → Folder?
If folder is inside a Dart SDK, returns the directory of the SDK, and null otherwise.