BuildStep class abstract
some of the abstractions are borrowed from the build package A single step in a build process.
This represents a single asset, logic around resolving as a library, and the ability to read and write assets as allowed by the underlying build system. BuildStep provides an abstraction over the file system operations needed during code generation, allowing builders to focus on transformation logic rather than I/O handling.
- Implementers
Constructors
Properties
-
allowedExtensions
→ Set<
String> -
The set of allowed file extensions for output assets.
no setter
- asset → Asset
-
The primary input for this build step.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
outputs
→ Set<
Uri> -
The set of output URIs that have been written by this build step.
no setter
- resolver → Resolver
-
The Resolver for this build step.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
findAssets(
PathMatcher matcher, {String? subDir}) → List< Asset> -
Finds assets within the root package that match the
matcher
pattern. -
hasValidPartDirectiveFor(
String extension) → bool - Returns true if the input library has a part directive for the given extension.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
writeAsBytes(
List< int> bytes, {required String extension}) → FutureOr<void> -
Writes
bytes
to a binary file located atid
. -
writeAsString(
String contents, {required String extension, Encoding encoding = utf8}) → FutureOr< void> -
Writes
contents
to a text file with the specifiedextension
using the givenencoding
.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited