Library class Null safety

The representation of a dart file within a dart package

Constructors

Library({required String packageName, required String path, PackageConfig? packageConfig})
The representation of a dart file within a dart package

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
packageConfig PackageConfig?
The package configuration for this library.
final
packageName String
The name of the package that this library belongs to.
final
path String
The absolute path to a dart file.
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
inherited
withCode(String code) Code
Creates an instance of Code from a raw string, to be used by compiles.

Operators

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

Static Methods

custom({required String packageName, required String path, required String packageRoot}) Future<Library>
Resolve a Library defined in a separate package, obtaining packageConfig from that package's package_config.json.
parseFromStacktrace() Future<Library>
Decode the StackTrace to try and extract informations about the current library. [...]