AssetId class

Identifies an asset within a package.


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". [...]
AssetId.resolve(String uri, { AssetId from })
Creates a new AssetId from an uri String. [...]


extension → String
The file extension of the asset, if it has one, including the ".".
hashCode → int
The hash code for this object. [...]
package → String
The name of the package containing this asset.
path → String
The path to the asset relative to the root directory of package. [...]
pathSegments → List<String>
Splits path into its components.
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.
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited


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.


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