AsyncImporter class abstract
An interface for importers that resolves URLs in @import
s 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 class should only be extended by importers that need to do
asynchronous work. It's only compatible with the asynchronous compile()
methods. If an importer can work synchronously, it should extend Importer
instead.
Subclasses should extend AsyncImporter, not implement it.
Constructors
Properties
- containingUrl → Uri?
-
The canonical URL of the stylesheet that caused the current canonicalize
invocation.
no setter
- fromImport → bool
-
Whether the current canonicalize invocation comes from an
@import
rule.no setter - 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) → FutureOr< Uri?> -
If
url
is recognized by this importer, returns its canonical format. -
couldCanonicalize(
Uri url, Uri canonicalUrl) → FutureOr< bool> -
Without accessing the filesystem, returns whether or not passing
url
to canonicalize could possibly returncanonicalUrl
. -
isNonCanonicalScheme(
String scheme) → FutureOr< bool> -
Returns whether the given URL scheme (without
:
) should be considered "non-canonical" for this importer. -
load(
Uri url) → FutureOr< ImporterResult?> -
Loads the Sass text for the given
url
, or returnsnull
if this importer can't find the stylesheet it refers to. -
modificationTime(
Uri url) → FutureOr< DateTime> -
Returns the time that the Sass file at
url
was last modified. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited