CompositeModuleLoader class

A ModuleLoader that delegates to a chain of loaders, returning the first non-null result for each operation. Web-safe: it adds no capabilities of its own, only composition, so an optional (e.g. filesystem/pub) loader can be layered on top of the in-memory VMModuleLoader without touching the core.

Implemented types

Constructors

CompositeModuleLoader(List<ModuleLoader> loaders)

Properties

hashCode int
The hash code for this object.
no setterinherited
loaders List<ModuleLoader>
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

loadModule(String moduleId, {String? language}) LoadedModule?
Loads the module with canonical id moduleId, or null.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolveCorePackage(String importPath) → CorePackageBase?
Resolves importPath to a built-in core package, or null.
override
resolveModuleId(String importPath, {String? fromModule, String? language}) String?
Normalizes importPath (optionally relative to fromModule) to the canonical id of a loadable module, or null if none matches.
override
toString() String
A string representation of this object.
inherited

Operators

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