AssetId class

A file in a build_runner build.

Implemented types

Constructors

AssetId(String package, String path)
An AssetId with the specified path under package.
AssetId.deserialize(List serialized)
Deserializes a List<dynamic> from serialize.
factory
AssetId.parse(String id)
Parses an AssetId string of the form $package|$path.
factory
AssetId.resolve(Uri uri, {AssetId? from})
Creates an AssetId from a uri.
factory

Properties

extension String
The file extension of path: the portion of its "basename" from the last . to the end, including the . itself.
no setter
hashCode int
The hash code for this object.
no setteroverride
package String
The package containing the file.
final
path String
The relative path within package.
final
pathSegments List<String>
The segments of path.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
uri Uri
If path starts with lib/, the URI starting package: that refers to this asset.
latefinal

Methods

addExtension(String extension) AssetId
Returns an AssetId in package with path $path$exension.
changeExtension(String newExtension) AssetId
Returns an AssetId in package with extension removed and newExtension appended.
compareTo(AssetId other) int
Compares this object to another object.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
serialize() Object
Serializes this AssetId to an Object that can be sent across isolates.
toString() String
Returns $package|$path, which can be converted back to an AssetId using AssetId.parse.
override

Operators

operator ==(Object other) bool
The equality operator.
override