writeOpenNamespace method
void
writeOpenNamespace(
- JavaOptions generatorOptions,
- Root root,
- Indent indent, {
- required String dartPackageName,
override
Writes code to indent
that opens file namespace if needed.
This method is not required, and does not need to be overridden.
Implementation
@override
void writeOpenNamespace(
JavaOptions generatorOptions,
Root root,
Indent indent, {
required String dartPackageName,
}) {
indent.writeln(
'$_docCommentPrefix Generated class from Pigeon.$_docCommentSuffix');
indent.writeln(
'@SuppressWarnings({"unused", "unchecked", "CodeBlock2Expr", "RedundantSuppression", "serial"})');
if (generatorOptions.useGeneratedAnnotation ?? false) {
indent.writeln('@javax.annotation.Generated("dev.flutter.pigeon")');
}
indent.writeln('public class ${generatorOptions.className!} {');
indent.inc();
}