ImportCache class final

An in-memory cache of parsed stylesheets that have been imported by Sass.

Constructors

ImportCache({Iterable<Importer>? importers, Iterable<String>? loadPaths, PackageConfig? packageConfig})
Creates an import cache that resolves imports using importers.
ImportCache.none()
Creates an import cache without any globally-available importers.
ImportCache.only(Iterable<Importer> importers)
Creates an import cache without any globally-available importers, and only the passed in importers.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

canonicalize(Uri url, {Importer? baseImporter, Uri? baseUrl, bool forImport = false}) CanonicalizeResult?
Canonicalizes url according to one of this cache's importers.
humanize(Uri canonicalUrl) Uri
Return a human-friendly URL for canonicalUrl to use in a stack trace.
import(Uri url, {Importer? baseImporter, Uri? baseUrl, bool forImport = false}) → (Importer, Stylesheet)?
Tries to import url using one of this cache's importers.
importCanonical(Importer importer, Uri canonicalUrl, {Uri? originalUrl}) Stylesheet?
Tries to load the canonicalized canonicalUrl using importer.
loadTime(Uri canonicalUrl) DateTime?
Returns the most recent time the stylesheet at canonicalUrl was loaded from its importer, or null if it has never been loaded.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sourceMapUrl(Uri canonicalUrl) Uri
Returns the URL to use in the source map to refer to canonicalUrl.
toString() String
A string representation of this object.
inherited

Operators

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