generate method
Write the generated code described in root
to sink
using the options
.
Implementation
@override
void generate(
StringSink sink, PigeonOptions options, Root root, FileType fileType) {
final DartOptions dartOptionsWithHeader = _dartOptionsWithCopyrightHeader(
options.dartOptions,
options.copyrightHeader,
basePath: options.basePath ?? '',
);
const DartGenerator generator = DartGenerator();
generator.generate(
dartOptionsWithHeader,
root,
sink,
dartPackageName: options.getPackageName(),
);
}