shouldGenerate method
Returns an IOSink instance to be written to if the GeneratorAdapter should generate.
If it returns null
, the GeneratorAdapter will be skipped.
Implementation
@override
IOSink? shouldGenerate(PigeonOptions options, FileType fileType) {
if (fileType == FileType.source) {
return _openSink(options.gobjectSourceOut,
basePath: options.basePath ?? '');
} else {
return _openSink(options.gobjectHeaderOut,
basePath: options.basePath ?? '');
}
}