AssetId class

Identifies an asset within a package.

Constructors

AssetId(String package String path)
Creates a new AssetId at path within package. [...]
AssetId.deserialize(List data)
Deserializes an AssetId from data, which must be the result of calling serialize on an existing AssetId.
AssetId.parse(String description)
Parses an AssetId string of the form "package|path/to/asset.txt". [...]
factory
AssetId.resolve(String uri, { AssetId from })
Creates a new AssetId from an uri String. [...]
factory

Properties

extension → String
The file extension of the asset, if it has one, including the ".".
read-only
hashCode → int
The hash code for this object. [...]
read-only
package → String
The name of the package containing this asset.
final
path → String
The path to the asset relative to the root directory of package. [...]
final
pathSegments → List<String>
Splits path into its components.
read-only
uri → Uri
A package: URI suitable for use directly with other systems if this asset is under it's package's lib/ directory, else an asset: URI suitable for use within build tools.
read-only
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

addExtension(String extension) AssetId
Returns a new AssetId with the same package as this one and with the path extended to include extension.
changeExtension(String newExtension) AssetId
Returns a new AssetId with the same package and path as this one but with file extension newExtension.
compareTo(AssetId other) → int
Compares this object to another Comparable [...]
serialize() → Object
Serializes this AssetId to an object that can be sent across isolates and passed to AssetId.deserialize.
toString() → String
Returns a string representation of this object.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited

Operators

operator ==(Object other) → bool
Returns true if other is an AssetId with the same package and path.