SyntheticBuilder<S extends SyntheticInput> constructor

SyntheticBuilder<S extends SyntheticInput>({
  1. required String inputFiles,
  2. String header = '',
  3. String footer = '',
  4. Formatter? formatter,
})

Super constructor of an object of type SyntheticBuilder.

  • inputFiles: Path to the input files relative to the package root directory. Glob-style syntax is allowed for example: lib/*.dart.
  • 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. To disable formatting one may pass a closure returning the input: (input) => input as argument for formatter.

Implementation

SyntheticBuilder({
  required this.inputFiles,
  this.header = '',
  this.footer = '',
  Formatter? formatter,
})  : formatter = formatter ?? DartFormatter().format,
      syntheticInput = SyntheticInput.instance<S>();