writeFilePrologue method

  1. @override
void writeFilePrologue(
  1. DartOptions generatorOptions,
  2. Root root,
  3. Indent indent, {
  4. required String dartPackageName,
})
override

Adds specified headers to indent.

Implementation

@override
void writeFilePrologue(
  DartOptions generatorOptions,
  Root root,
  Indent indent, {
  required String dartPackageName,
}) {
  if (generatorOptions.copyrightHeader != null) {
    addLines(indent, generatorOptions.copyrightHeader!, linePrefix: '// ');
  }
  indent.writeln('// ${getGeneratedCodeWarning()}');
  indent.writeln('// $seeAlsoWarning');
  indent.writeln(
    '// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers',
  );
  indent.newln();
}