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
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
PackageConfigof 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
idcan be read by this build step.override -
digest(
AssetId id) → Future< Digest> -
Returns a
Digestrepresenting a hash of the contents ofid.inherited -
fetchResource<
T> (Resource< T> resource) → Future<T> -
Fetches
resource. -
findAssets(
Glob glob) → Stream< AssetId> -
Returns all readable assets matching
globunder 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
idusingencoding.override -
reportUnusedAssets(
Iterable< AssetId> ids) → void -
Indicates that
idswere 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
actionseparately. -
writeAsBytes(
AssetId id, FutureOr< List< bytes) → Future<int> >void> -
Writes
bytestoid.override -
writeAsString(
AssetId id, FutureOr< String> contents, {Encoding encoding = utf8}) → Future<void> -
Writes
contentstoidusingencoding.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited