BuildStep class abstract

A single step in build_runner build.

See the Builder class API for more information on what causes build steps to run during a builder. The Builder class has a build method that accepts a BuildStep and uses it to read inputs, resolve Dart source and write outputs.

Implemented types

Constructors

BuildStep()

Properties

allowedOutputs Iterable<AssetId>
Assets that are allowed to be written by this build step.
no setter
hashCode int
The hash code for this object.
no setterinherited
inputId AssetId
The primary input that this build step is for.
no setter
inputLibrary Future<LibraryElement>
Resolves the library in inputId.
no setter
packageConfig Future<PackageConfig>
The PackageConfig of the current isolate.
no setter
resolver Resolver
A Resolver that can parse or resolve any Dart source code visible to this build step.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

canRead(AssetId id) Future<bool>
Indicates whether id can be read by this build step.
override
digest(AssetId id) Future<Digest>
Returns a Digest representing a hash of the contents of id.
inherited
fetchResource<T>(Resource<T> resource) Future<T>
Fetches resource.
findAssets(Glob glob) Stream<AssetId>
Returns all readable assets matching glob under the current package.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readAsBytes(AssetId id) Future<List<int>>
Reads the bytes from id.
override
readAsString(AssetId id, {Encoding encoding = utf8}) Future<String>
Reads the text contents of id using encoding.
override
reportUnusedAssets(Iterable<AssetId> ids) → void
Indicates that ids were read but their content has no impact on the outputs of this step.
toString() String
A string representation of this object.
inherited
trackStage<T>(String label, T action(), {bool isExternal = false}) → T
Tracks performance of action separately.
writeAsBytes(AssetId id, FutureOr<List<int>> bytes) Future<void>
Writes bytes to id.
override
writeAsString(AssetId id, FutureOr<String> contents, {Encoding encoding = utf8}) Future<void>
Writes contents to id using encoding.
override

Operators

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