PackageImporter class
An importer that loads stylesheets from package:
imports.
- Inheritance
-
- Object
- AsyncImporter
- Importer
- PackageImporter
- Annotations
-
- @sealed
Constructors
- PackageImporter(PackageConfig packageConfig)
-
Creates an importer that loads stylesheets from
package:
URLs according topackageConfig
, which is aPackageConfig
from thepackage_config
package.
Properties
- containingUrl → Uri?
-
The canonical URL of the stylesheet that caused the current canonicalize
invocation.
no setterinherited
- fromImport → bool
-
Whether the current canonicalize invocation comes from an
@import
rule.no setterinherited - 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) → Uri? -
If
url
is recognized by this importer, returns its canonical format.override -
couldCanonicalize(
Uri url, Uri canonicalUrl) → bool -
Without accessing the filesystem, returns whether or not passing
url
to canonicalize could possibly returncanonicalUrl
.override -
isNonCanonicalScheme(
String scheme) → bool -
Returns whether the given URL scheme (without
:
) should be considered "non-canonical" for this importer.inherited -
load(
Uri url) → ImporterResult? -
Loads the Sass text for the given
url
, or returnsnull
if this importer can't find the stylesheet it refers to.override -
modificationTime(
Uri url) → DateTime -
Returns the time that the Sass file at
url
was last modified.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited