LibraryBuilder class
A Builder
which generates standalone Dart library files.
A single Generator is responsible for generating the entirety of the output since it must also output any relevant import directives at the beginning of it's output.
Constructors
-
LibraryBuilder.new(Generator generator, {String formatOutput(String code, Version languageVersion) = _defaultFormatUnit, String generatedExtension = '.g.dart', List<
String> additionalOutputExtensions = const [], bool? writeDescriptions, String? header, bool allowSyntaxErrors = false, BuilderOptions? options}) -
Wrap
generator
as aBuilder
that generates Dart library files.
Properties
- allowSyntaxErrors → bool
-
Whether to allow syntax errors in input libraries.
finalinherited
-
buildExtensions
→ Map<
String, List< String> > -
Mapping from input file extension to output file extensions.
finalinherited
- formatOutput → String Function(String code, Version languageVersion)
-
Function that determines how the generated code is formatted.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
build(
BuildStep buildStep) → Future< void> -
Generates the outputs for a given
BuildStep
.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited