Package constructor
const
Package({})
🍃 JetLeaf Framework - Represents a Dart package within the runtime context.
This metadata is usually generated at compile time (JIT or AOT) to describe:
- The root application package
- Any dependent packages (e.g.,
args
,collection
)
This class allows tools, scanners, and the reflection system to access package-specific information like name, version, and file location.
Example:
Package pkg = ...;
print(pkg.getName()); // => "jetleaf"
print(pkg.getIsRootPackage()); // => true
Implementation
const Package({
required String name,
required String version,
String? languageVersion,
required bool isRootPackage,
String? filePath,
String? rootUri,
}) : _filePath = filePath, _languageVersion = languageVersion, _version = version, _name = name, _isRootPackage = isRootPackage, _rootUri = rootUri;