builder library

Classes

Asset
A representation of a file-based resource.
BuildCandidate
Represents an asset that is a candidate for building.
Builder
The basic builder class, used to build new files from existing ones.
BuilderDefinitionEntry
Defines a builder configuration for code generation.
BuilderOptions
Configuration options for a Builder.
BuilderOverride
Represents overrides for a builder configuration.
BuildStep
some of the abstractions are borrowed from the build package A single step in a build process.
BuildStepImpl
Default implementation of BuildStep that writes files to the file system.
CallbackPathMatcher
A PathMatcher implementation that uses a callback function to match paths.
ExportedSymbol
Represents a symbol exported by an asset.
FileAsset
A representation of a file-based resource.
FileAssetReader
A class that reads file assets from the filesystem.
GeneratedOutput
Represents the output produced by a generator.
Generator
A tool to generate Dart code based on a Dart library source.
GeneratorForAnnotatedClass<T>
A generator that processes class elements with a specific annotation type.
GeneratorForAnnotatedEnum<T>
A generator that processes enum elements with a specific annotation type.
GeneratorForAnnotatedFunction<T>
A generator that processes function elements with a specific annotation type.
GeneratorForAnnotation<T>
A generator that processes elements with a specific annotation type.
GeneratorForAnnotationBase
Base class for generators that process elements with specific annotations.
GlobPathMatcher
A PathMatcher implementation that uses a Glob pattern to match paths.
LeanBuilder
Annotation for defining a build-time builder.
LeanBuilderOverrides
Annotation for specifying builder overrides at the top level.
LeanGenerator
Annotation for defining a code generator.
LibraryBuilder
A specialized Builder that generates Dart library files.
PackageFileResolver
Abstract interface for resolving package file paths in a Dart project.
PathMatcher
An abstract class for matching paths against a pattern.
RegexPathMatcher
A PathMatcher implementation that uses a regular expression to match paths.
Resolver
Abstract interface for resolving Dart elements and types.
RuntimeTypeRegisterEntry
Represents a runtime type entry used for registering type annotations.
SharedBuildStep
A specialized build step that buffers output content to be written as a single part file.
SharedPartBuilder
A specialized Builder that generates Dart part files that can be shared by multiple generators.

Enums

BuilderType
Enumerates the different types of builders supported by the system.

Constants

dartFormatWidth → const String
A comment configuring dart_style to use the default code width so no configuration discovery is required.
defaultFileHeader → const String
Default header for generated files.
kBuilderAnnotationNames → const Set<String>
A collection of annotation names used by the lean_builder package.

Functions

normalizeGeneratorOutput(Object? value) Future<Iterable<String>>
Converts Future, Iterable, or String to a normalized output.
spanForElement(Element element) → SourceSpan
Returns a source span that spans the location where element is defined.
spanForNode(AstNode node) → SourceSpan
Returns a source span that spans the location where node is written.

Exceptions / Errors

AssetUriError
Asset URI could not be constructed.
InvalidGenerationSourceError
A description of a problem in the source input to code generation.
InvalidPathError
Invalid path format or structure.
PackageConfigNotFound
Package configuration could not be loaded.
PackageConfigParseError
JSON parsing failed when processing package configuration.
PackageFileResolverError
Base class for all resolver-related errors.
PackageNotFoundError
Requested package not found in configuration.