Importer class

An interface for importers that resolves URLs in @imports to the contents of Sass files.

Importers should override toString to provide a human-readable description of the importer. For example, the default filesystem importer returns its load path.

This extends AsyncImporter to guarantee that canonicalize and load are synchronous. It's usable with both the synchronous and asynchronous compile() functions, and as such should be extended in preference to AsyncImporter if possible.

Subclasses should extend Importer, not implement it.

Inheritance
Implemented by

Constructors

Importer()

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

canonicalize(Uri url) Uri
If url is recognized by this importer, returns its canonical format. [...]
load(Uri url) ImporterResult
Loads the Sass text for the given url, or returns null if this importer can't find the stylesheet it refers to. [...]
modificationTime(Uri url) DateTime
Returns the time that the Sass file at url was last modified. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

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

Static Properties

noOp Importer
An importer that never imports any stylesheets. [...]
final