MergingBuilder<T, S extends SyntheticInput> constructor
MergingBuilder<T, S extends SyntheticInput> ({
- 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.
inputFiles
: Path to the input files relative to the package root directory. Glob-style syntax is allowed, defaults to:'lib/*.dart'
.outputFile
: defaults to:'lib/merged_output.dart'
.generator
: Must extendMergingGenerator<T, A>
.header
:String
that will be inserted at the top of the generated file below the 'DO NOT EDIT' warning message.footer
: String that will be inserted at the very bottom of the generated file.formatter
: A function with signatureString Function(String input)
that is used to format the generated source code. The default formatter is:DartFormatter().format
. Note: The standard Dart formatter will throw an error if the generated source code contains invalid syntax. To temporarily suppress formatting use:(String input) => input
.
Implementation
MergingBuilder({
super.inputFiles = 'lib/*.dart',
this.outputFile = 'lib/merged_output.dart',
required this.generator,
super.header,
super.footer,
this.sortAssets = false,
super.formatter,
});