AsyncImportCache class final

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

Constructors

AsyncImportCache({Iterable<AsyncImporter>? importers, Iterable<String>? loadPaths, PackageConfig? packageConfig})
Creates an import cache that resolves imports using importers.
AsyncImportCache.none()
Creates an import cache without any globally-available importers.
AsyncImportCache.only(Iterable<AsyncImporter> 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, {AsyncImporter? baseImporter, Uri? baseUrl, bool forImport = false}) Future<AsyncCanonicalizeResult?>
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, {AsyncImporter? baseImporter, Uri? baseUrl, bool forImport = false}) Future<(AsyncImporter, Stylesheet)?>
Tries to import url using one of this cache's importers.
importCanonical(AsyncImporter importer, Uri canonicalUrl, {Uri? originalUrl}) Future<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