PubPackageMeta class abstract
Default implementation of PackageMeta depends on pub packages.
- Inheritance
-
- Object
- PackageMeta
- PubPackageMeta
Constructors
- PubPackageMeta(Folder dir, ResourceProvider resourceProvider)
Properties
- description → String
-
no setterinherited
- dir → Folder
-
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- homepage → String
-
no setterinherited
- hostedAt → String?
-
null if not a hosted pub package. If set, the hostname
that the package is hosted at -- usually 'pub.dartlang.org'.
no setterinherited
- isSdk → bool
-
Returns true if this represents a 'Dart' SDK.
no setterinherited
- isValid → bool
-
Returns true if we are a valid package, valid enough to generate docs.
no setterinherited
- name → String
-
no setterinherited
- pathContext → Context
-
no setterinherited
- repository → String
-
no setterinherited
- requiresFlutter → bool
-
no setterinherited
- resolvedDir → String
-
Returns resolved directory.
latefinal
- resourceProvider → ResourceProvider
-
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- version → String
-
no setterinherited
Methods
-
getChangelogContents(
) → File? -
inherited
-
getInvalidReasons(
) → List< String> -
Returns a list of reasons this package is invalid, or an
empty list if no reasons found.
inherited
-
getLicenseContents(
) → File? -
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 a 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
. Multipledir.absolute.path
s 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? -
messageForMissingPackageMeta(
LibraryElement library, DartdocOptionContext optionContext) → String - Create a helpful user error message for a case where a package can not be found.
-
sdkDirParent(
Folder folder, ResourceProvider resourceProvider) → Folder? -
If
folder
is inside a Dart SDK, returns the directory of the SDK, andnull
otherwise.