StandaloneBuilder<S extends SyntheticInput> constructor

StandaloneBuilder<S extends SyntheticInput>({
  1. String inputFiles = 'lib/*.dart',
  2. String outputFiles = 'lib/standalone_(*).dart',
  3. required Generator generator,
  4. String header = '',
  5. String footer = '',
  6. Formatter? formatter,
  7. String root = '',
})

Constructs a StandaloneBuilder object.

  • inputFiles defaults to: 'lib/*.dart'. Glob-style syntax supported.

  • outputFiles: Path to the output files. The symbol (*) will be replaced with the corresponding input file name (omitting the extension). Defaults to: 'lib/standalone_(*).dart'.

  • generator: An instance of Generator.

  • header: A String that will be inserted at the top of the generated file below the 'DO NOT EDIT' warning message.

  • footer: A String that will be inserted at the very bottom of the generated file.

  • formatter: A function with signature String Function(String input). Defaults to DartFormatter().format. To disable formatting one may pass a closure returning the input: (input) => input as argument for formatter.

Implementation

StandaloneBuilder({
  super.inputFiles = 'lib/*.dart',
  this.outputFiles = 'lib/standalone_(*).dart',
  required this.generator,
  super.header,
  super.footer,
  super.formatter,
  String root = '',
}) : root = root.trim() {
  _resolvedOutputFiles = Lazy(_outputPaths);
}