MergingBuilder<T, S extends SyntheticInput> constructor

MergingBuilder<T, S extends SyntheticInput>({
  1. String inputFiles = 'lib/*.dart',
  2. String outputFile = 'lib/merged_output.dart',
  3. required MergingGenerator<T, dynamic> generator,
  4. String header = '',
  5. String footer = '',
  6. bool sortAssets = false,
  7. 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 extend MergingGenerator<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 signature String 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,
});