MergingBuilder<T, S extends SyntheticInput> class
Builder that merges its output into one file.
-
Input files must be specified using
Glob
syntax. -
Requires a generator extending MergingGenerator.
- Inheritance
-
- Object
- SyntheticBuilder<
S> - MergingBuilder
Constructors
-
MergingBuilder({String inputFiles = 'lib/*.dart', String outputFile = 'lib/merged_output.dart', required MergingGenerator<
T, dynamic> generator, String header = '', bool sortAssets = false, Formatter? formatter}) - Constructs a MergingBuilder object.
Properties
-
buildExtensions
→ Map<
String, List< String> > -
Mapping from input file extension to output file extensions.
no setter
-
String that will be inserted at the very bottom of the
generated file.
finalinherited
- formatter → Formatter
-
A function with signature
String Function(String input)
. Defaults toDartFormatter().format
.finalinherited -
generator
→ MergingGenerator<
T, dynamic> -
Class extending MergingGenerator<T,A>.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- header → String
-
String that will be inserted at the top of the
generated file below the 'DO NOT EDIT' warning message.
finalinherited
- inputFiles → String
-
Input files. Specify the complete path relative to the
root directory.
finalinherited
- outputFile → String
-
Path to output file relative to the package root directory.
Example:
lib/merged_output.dart
final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sortAssets → bool
-
Set to true to have assets sorted in reverse topological order of
dependency.
final
- syntheticInput → S
-
The synthetic input used by this builder.
finalinherited
Methods
-
arrangeContent(
String source, {String generatedBy = ''}) → String -
Returns the generated source code
after adding the header and footer.
inherited
-
build(
BuildStep buildStep) → FutureOr< void> - Writes the merged content to the stand-alone file specified by outputFile.
-
libraryAssetIds(
BuildStep buildStep) → Future< List< AssetId> > -
Returns a list of unordered library asset ids.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
orderedLibraryAssetIds(
BuildStep buildStep) → Future< Set< AssetId> > -
Returns a ordered set of library asset ids ordered in reverse topological
dependency order.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited