BuildStep class

A single step in a build process.

This represents a single inputId, logic around resolving as a library, and the ability to read and write assets as allowed by the underlying build system.

Implemented types

Constructors

BuildStep()

Properties

inputId AssetId
The primary for this build step.
read-only
inputLibrary Future<LibraryElement>
Resolved library defined by inputId. [...]
read-only
resolver Resolver
A Resolver for inputId.
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

fetchResource<T>(Resource<T> resource) Future<T>
Gets an instance provided by resource which is guaranteed to be unique within a single build, and may be reused across build steps within a build if the implementation allows. [...]
trackStage<T>(String label, T action(), { bool isExternal: false }) → T
Tracks performance of action separately. [...]
writeAsBytes(AssetId id, FutureOr<List<int>> bytes) Future
Writes bytes to a binary file located at id. [...]
override
writeAsString(AssetId id, FutureOr<String> contents, { Encoding encoding: utf8 }) Future
Writes contents to a text file located at id with encoding. [...]
override
canRead(AssetId id) Future<bool>
Indicates whether asset at id is readable.
inherited
digest(AssetId id) Future<Digest>
Returns a Digest representing a hash of the contents of id. [...]
inherited
findAssets(Glob glob) Stream<AssetId>
Returns all readable assets matching glob under the current package.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
readAsBytes(AssetId id) Future<List<int>>
Returns a Future that completes with the bytes of a binary asset. [...]
inherited
readAsString(AssetId id, { Encoding encoding: utf8 }) Future<String>
Returns a Future that completes with the contents of a text asset. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited